summaryrefslogtreecommitdiff
path: root/rust/src/hlil/lift.rs
diff options
context:
space:
mode:
authorMichael Krasnitski <michael.krasnitski@gmail.com>2024-02-11 19:31:42 -0500
committerKyle Martin <krm504@nyu.edu>2024-03-18 17:46:37 -0400
commit044ddd5196ef42a7fd7ac7c11d93f3d8ecb1c4d2 (patch)
treec59df69a8636581db969f4aacf5415d9c728ef74 /rust/src/hlil/lift.rs
parentbb04b38ea5d685dc44679e36ac19c5de2a41fca2 (diff)
Rearrange HLIL variants
The order of variants in the `lift` function didn't match the declared order.
Diffstat (limited to 'rust/src/hlil/lift.rs')
-rw-r--r--rust/src/hlil/lift.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/rust/src/hlil/lift.rs b/rust/src/hlil/lift.rs
index 06338dea..e993bcae 100644
--- a/rust/src/hlil/lift.rs
+++ b/rust/src/hlil/lift.rs
@@ -28,6 +28,14 @@ pub struct HighLevelILLiftedInstruction {
#[derive(Clone, Debug, PartialEq)]
pub enum HighLevelILLiftedInstructionKind {
+ Nop,
+ Break,
+ Continue,
+ Noret,
+ Unreachable,
+ Bp,
+ Undef,
+ Unimpl,
Adc(LiftedBinaryOpCarry),
Sbb(LiftedBinaryOpCarry),
Rlc(LiftedBinaryOpCarry),
@@ -124,14 +132,6 @@ pub enum HighLevelILLiftedInstructionKind {
IntrinsicSsa(LiftedIntrinsicSsa),
Jump(LiftedJump),
MemPhi(LiftedMemPhi),
- Nop,
- Break,
- Continue,
- Noret,
- Unreachable,
- Bp,
- Undef,
- Unimpl,
Ret(LiftedRet),
Split(LiftedSplit),
StructField(LiftedStructField),
@@ -157,6 +157,7 @@ impl HighLevelILLiftedInstruction {
use HighLevelILLiftedInstructionKind::*;
use HighLevelILLiftedOperand as Operand;
match &self.kind {
+ Nop | Break | Continue | Noret | Unreachable | Bp | Undef | Unimpl => vec![],
Adc(op) | Sbb(op) | Rlc(op) | Rrc(op) => vec![
("left", Operand::Expr(*op.left.clone())),
("right", Operand::Expr(*op.right.clone())),
@@ -274,7 +275,6 @@ impl HighLevelILLiftedInstruction {
("dest", Operand::Int(op.dest)),
("src", Operand::IntList(op.src.clone())),
],
- Nop | Break | Continue | Noret | Unreachable | Bp | Undef | Unimpl => vec![],
Ret(op) => vec![("src", Operand::ExprList(op.src.clone()))],
Split(op) => vec![
("high", Operand::Expr(*op.high.clone())),