diff options
author | iximeow <me@iximeow.net> | 2024-06-23 10:11:57 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2024-06-23 10:11:57 -0700 |
commit | 4c1f3c84bdba53c514713fbaaf00431efd60d21c (patch) | |
tree | 88f37242d26c31d9ac27fe3a6bca474438404834 /src | |
parent | bebdead98a9fa6510e30dbde6cc694f52a346a1e (diff) |
add more conditional inlining for 32-bit and 16-bit decoders
Diffstat (limited to 'src')
-rw-r--r-- | src/protected_mode/mod.rs | 8 | ||||
-rw-r--r-- | src/real_mode/mod.rs | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/protected_mode/mod.rs b/src/protected_mode/mod.rs index 0d125eb..cf72fda 100644 --- a/src/protected_mode/mod.rs +++ b/src/protected_mode/mod.rs @@ -5706,7 +5706,8 @@ const OPCODES: [OpcodeRecord; 256] = [ ]; #[allow(non_snake_case)] -#[inline(always)] +#[cfg_attr(feature="profiling", inline(never))] +#[cfg_attr(not(feature="profiling"), inline(never))] pub(self) fn read_E< T: Reader<<Arch as yaxpeax_arch::Arch>::Address, <Arch as yaxpeax_arch::Arch>::Word>, S: DescriptionSink<FieldDescription>, @@ -6444,6 +6445,7 @@ impl DecodeCtx { } } +#[cfg_attr(feature="profiling", inline(never))] fn read_opc_hotpath< T: Reader<<Arch as yaxpeax_arch::Arch>::Address, <Arch as yaxpeax_arch::Arch>::Word>, S: DescriptionSink<FieldDescription>, @@ -6494,6 +6496,8 @@ fn read_opc_hotpath< } } +#[cfg_attr(feature="profiling", inline(never))] +#[cfg_attr(not(feature="profiling"), inline(never))] fn read_with_annotations< T: Reader<<Arch as yaxpeax_arch::Arch>::Address, <Arch as yaxpeax_arch::Arch>::Word>, S: DescriptionSink<FieldDescription>, @@ -6654,6 +6658,8 @@ fn read_with_annotations< Ok(()) } +#[cfg_attr(feature="profiling", inline(never))] +#[cfg_attr(not(feature="profiling"), inline(never))] fn read_operands< T: Reader<<Arch as yaxpeax_arch::Arch>::Address, <Arch as yaxpeax_arch::Arch>::Word>, S: DescriptionSink<FieldDescription> diff --git a/src/real_mode/mod.rs b/src/real_mode/mod.rs index 68ab6dd..b73f38a 100644 --- a/src/real_mode/mod.rs +++ b/src/real_mode/mod.rs @@ -5706,7 +5706,8 @@ const OPCODES: [OpcodeRecord; 256] = [ ]; #[allow(non_snake_case)] -#[inline(always)] +#[cfg_attr(feature="profiling", inline(never))] +#[cfg_attr(not(feature="profiling"), inline(always))] pub(self) fn read_E< T: Reader<<Arch as yaxpeax_arch::Arch>::Address, <Arch as yaxpeax_arch::Arch>::Word>, S: DescriptionSink<FieldDescription>, @@ -6445,6 +6446,7 @@ impl DecodeCtx { } } +#[cfg_attr(feature="profiling", inline(never))] fn read_opc_hotpath< T: Reader<<Arch as yaxpeax_arch::Arch>::Address, <Arch as yaxpeax_arch::Arch>::Word>, S: DescriptionSink<FieldDescription>, @@ -6495,6 +6497,8 @@ fn read_opc_hotpath< } } +#[cfg_attr(feature="profiling", inline(never))] +#[cfg_attr(not(feature="profiling"), inline(always))] fn read_with_annotations< T: Reader<<Arch as yaxpeax_arch::Arch>::Address, <Arch as yaxpeax_arch::Arch>::Word>, S: DescriptionSink<FieldDescription>, @@ -6655,6 +6659,8 @@ fn read_with_annotations< Ok(()) } +#[cfg_attr(feature="profiling", inline(never))] +#[cfg_attr(not(feature="profiling"), inline(always))] fn read_operands< T: Reader<<Arch as yaxpeax_arch::Arch>::Address, <Arch as yaxpeax_arch::Arch>::Word>, S: DescriptionSink<FieldDescription> |