aboutsummaryrefslogtreecommitdiff
path: root/src/long_mode/mod.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2024-06-18 23:37:41 -0700
committeriximeow <me@iximeow.net>2024-06-19 00:05:35 -0700
commit6b0a7aa23f1f125213081cee1f37079e53f05882 (patch)
tree083e6c6bd1a176e5e21af0d6b76cf0225d6c5078 /src/long_mode/mod.rs
parentcc6f7cabfdd7e48f71241ffc8e4860be6d26ba93 (diff)
configurable inlining to help with opts
Diffstat (limited to 'src/long_mode/mod.rs')
-rw-r--r--src/long_mode/mod.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs
index e6d0a02..5a5b89a 100644
--- a/src/long_mode/mod.rs
+++ b/src/long_mode/mod.rs
@@ -4383,6 +4383,7 @@ impl Instruction {
/// if the work you expect to do per-operand is very small, constructing an `Operand` and
/// dispatching on tags may be a substantial factor of overall runtime. `visit_operand` can
/// reduce total overhead in such cases.
+ #[cfg_attr(features="profiling", inline(never))]
fn visit_operand<T: OperandVisitor>(&self, i: u8, visitor: &mut T) -> Result<T::Ok, T::Error> {
assert!(i < 4);
let spec = self.operands[i as usize];
@@ -6009,7 +6010,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>,
@@ -6638,6 +6640,7 @@ impl DecodeCtx {
self.rb_size
}
+#[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>,
@@ -6694,7 +6697,8 @@ fn read_opc_hotpath<
}
}
-#[inline(always)]
+#[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>,
@@ -6912,7 +6916,8 @@ fn read_avx_prefixed<
return Ok(());
}
-#[inline(always)]
+#[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>