diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2023-12-22 13:46:10 -0700 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2024-01-04 11:02:14 -0700 |
| commit | 80b07dfa158bb093cc93e602363655b62ae595f8 (patch) | |
| tree | 4e92af37909c07e64f41cbf73b2ea8e68e875ef0 /rust/src/llil | |
| parent | 7c98724a614550e37e5a33805e13179c87363b91 (diff) | |
Support function recognizers in Rust architecture plugins
Diffstat (limited to 'rust/src/llil')
| -rw-r--r-- | rust/src/llil/instruction.rs | 4 | ||||
| -rw-r--r-- | rust/src/llil/mod.rs | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/rust/src/llil/instruction.rs b/rust/src/llil/instruction.rs index c9817dbf..36733472 100644 --- a/rust/src/llil/instruction.rs +++ b/rust/src/llil/instruction.rs @@ -111,6 +111,7 @@ where LLIL_CALL | LLIL_CALL_STACK_ADJUST => { InstrInfo::Call(Operation::new(self.function, op)) } + LLIL_TAILCALL => InstrInfo::TailCall(Operation::new(self.function, op)), LLIL_SYSCALL => InstrInfo::Syscall(Operation::new(self.function, op)), LLIL_INTRINSIC => InstrInfo::Intrinsic(Operation::new(self.function, op)), _ => { @@ -149,7 +150,7 @@ where visit!(fb, &op.source_expr()); } Push(ref op) => visit!(fb, &op.operand()), - Call(ref op) => visit!(fb, &op.target()), + Call(ref op) | TailCall(ref op) => visit!(fb, &op.target()), Intrinsic(ref _op) => { // TODO: Use this when we support expression lists // for expr in op.source_exprs() { @@ -180,6 +181,7 @@ where JumpTo(Operation<'func, A, M, F, operation::JumpTo>), Call(Operation<'func, A, M, F, operation::Call>), + TailCall(Operation<'func, A, M, F, operation::Call>), Ret(Operation<'func, A, M, F, operation::Ret>), NoRet(Operation<'func, A, M, F, operation::NoArgs>), diff --git a/rust/src/llil/mod.rs b/rust/src/llil/mod.rs index f7696d57..8d199a2a 100644 --- a/rust/src/llil/mod.rs +++ b/rust/src/llil/mod.rs @@ -49,7 +49,7 @@ pub type LiftedExpr<'a, Arch> = Expression<'a, Arch, Mutable, NonSSA<LiftedNonSS pub type RegularFunction<Arch> = Function<Arch, Finalized, NonSSA<RegularNonSSA>>; pub type SSAFunction<Arch> = Function<Arch, Finalized, SSA>; -#[derive(Copy, Clone)] +#[derive(Copy, Clone, PartialEq, Eq)] pub enum Register<R: ArchReg> { ArchReg(R), Temp(u32), |
