From 8d621c51b2797fda7b1dc22243dde611cfc04f68 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Tue, 23 Dec 2025 13:12:02 -0700 Subject: Refactor calling conventions to support correct representation of structures --- rust/src/high_level_il/lift.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'rust/src/high_level_il/lift.rs') diff --git a/rust/src/high_level_il/lift.rs b/rust/src/high_level_il/lift.rs index ab04f44b..e2ce3686 100644 --- a/rust/src/high_level_il/lift.rs +++ b/rust/src/high_level_il/lift.rs @@ -112,6 +112,8 @@ pub enum HighLevelILLiftedInstructionKind { ConstData(LiftedConstData), Deref(LiftedUnaryOp), AddressOf(LiftedUnaryOp), + PassByRef(LiftedUnaryOp), + ReturnByRef(LiftedUnaryOp), Neg(LiftedUnaryOp), Not(LiftedUnaryOp), Sx(LiftedUnaryOp), @@ -240,6 +242,8 @@ impl HighLevelILLiftedInstruction { ConstData(_) => "ConstData", Deref(_) => "Deref", AddressOf(_) => "AddressOf", + PassByRef(_) => "PassByRef", + ReturnByRef(_) => "ReturnByRef", Neg(_) => "Neg", Not(_) => "Not", Sx(_) => "Sx", @@ -360,10 +364,12 @@ impl HighLevelILLiftedInstruction { "constant_data", Operand::ConstantData(op.constant_data.clone()), )], - Deref(op) | AddressOf(op) | Neg(op) | Not(op) | Sx(op) | Zx(op) | LowPart(op) - | BoolToInt(op) | UnimplMem(op) | Fsqrt(op) | Fneg(op) | Fabs(op) | FloatToInt(op) - | IntToFloat(op) | FloatConv(op) | RoundToInt(op) | Floor(op) | Ceil(op) - | Ftrunc(op) => vec![("src", Operand::Expr(*op.src.clone()))], + Deref(op) | AddressOf(op) | PassByRef(op) | ReturnByRef(op) | Neg(op) | Not(op) + | Sx(op) | Zx(op) | LowPart(op) | BoolToInt(op) | UnimplMem(op) | Fsqrt(op) + | Fneg(op) | Fabs(op) | FloatToInt(op) | IntToFloat(op) | FloatConv(op) + | RoundToInt(op) | Floor(op) | Ceil(op) | Ftrunc(op) => { + vec![("src", Operand::Expr(*op.src.clone()))] + } DerefFieldSsa(op) => vec![ ("src", Operand::Expr(*op.src.clone())), ("src_memory", Operand::Int(op.src_memory)), -- cgit v1.3.1