diff --git a/rust/src/llil/operation.rs b/rust/src/llil/operation.rs index 3c40f2077..3ba4fa785 100644 --- a/rust/src/llil/operation.rs +++ b/rust/src/llil/operation.rs @@ -89,10 +89,10 @@ pub struct Syscall; pub struct Intrinsic; impl<'func, A, M, V> Operation<'func, A, M, NonSSA, Intrinsic> - where - A: 'func + Architecture, - M: FunctionMutability, - V: NonSSAVariant, +where + A: 'func + Architecture, + M: FunctionMutability, + V: NonSSAVariant, { // TODO: Support register and expression lists pub fn intrinsic(&self) -> Option { @@ -382,12 +382,20 @@ where } } + pub fn true_target_idx(&self) -> usize { + self.op.operands[1] as usize + } + pub fn false_target(&self) -> Instruction<'func, A, M, F> { Instruction { function: self.function, instr_idx: self.op.operands[2] as usize, } } + + pub fn false_target_idx(&self) -> usize { + self.op.operands[2] as usize + } } // LLIL_GOTO @@ -405,6 +413,10 @@ where instr_idx: self.op.operands[0] as usize, } } + + pub fn target_idx(&self) -> usize { + self.op.operands[0] as usize + } } // LLIL_FLAG_COND