diff options
author | iximeow <me@iximeow.net> | 2021-08-21 19:01:37 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2021-08-21 19:20:41 -0700 |
commit | a5a67ee666381b2716862dec6df2e85419c352bc (patch) | |
tree | 96df60ea808be57716ca4b20e2ba30a40d088942 /src/long_mode/mod.rs | |
parent | b6f83fa1b4859a6de2d7017e9709b9520d933f6b (diff) |
maintain pre-annotation inlining properties
this gets yaxpeax-x86 in no-inline configurations back to building as it
did before, but is quite a blunt hammer. it seems that extra calls to
`sink.record` trips the inlining thresholds for `read_with_annotation`,
and then its caller, and its caller, even when one of them is just a
delegation to its inner call.
this is particularly unfortunate because yaxpeax-x86 is now making a
decision about the inlining of a rather large function at the public
edge of its API, but these attributes match the inlining decisions that
LLVM was making before adding `DescriptionSink`. hopefully not too bad.
not sure how to handle this in the future.
Diffstat (limited to 'src/long_mode/mod.rs')
-rw-r--r-- | src/long_mode/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index d68bb95..8ec2b7f 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -4163,6 +4163,7 @@ impl Decoder<Arch> for InstDecoder { Ok(instr) } + #[inline(always)] fn decode_into<T: Reader<<Arch as yaxpeax_arch::Arch>::Address, <Arch as yaxpeax_arch::Arch>::Word>>(&self, instr: &mut Instruction, words: &mut T) -> Result<(), <Arch as yaxpeax_arch::Arch>::DecodeError> { self.decode_with_annotation(instr, words, &mut NullSink) } @@ -4171,6 +4172,7 @@ impl Decoder<Arch> for InstDecoder { impl AnnotatingDecoder<Arch> for InstDecoder { type FieldDescription = FieldDescription; + #[inline(always)] fn decode_with_annotation< T: Reader<<Arch as yaxpeax_arch::Arch>::Address, <Arch as yaxpeax_arch::Arch>::Word>, S: DescriptionSink<Self::FieldDescription> @@ -7446,6 +7448,7 @@ impl fmt::Display for FieldDescription { } } +#[inline(always)] fn read_with_annotations< T: Reader<<Arch as yaxpeax_arch::Arch>::Address, <Arch as yaxpeax_arch::Arch>::Word>, S: DescriptionSink<FieldDescription>, |