diff options
| author | Mark Rowe <mark@vector35.com> | 2026-06-03 21:25:55 -0700 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2026-06-04 14:31:09 -0700 |
| commit | d592ed6dafbb134553bf3a0b8ee70ff7f2049aba (patch) | |
| tree | 1bfe7e335e5b4e21371cde4bf8858c6439bc3f18 /rust/src/medium_level_il/lift.rs | |
| parent | 9987102015875991813200116558306851763009 (diff) | |
Add bswap, popcnt, clz, ctz, cls, and rbit instructions
Diffstat (limited to 'rust/src/medium_level_il/lift.rs')
| -rw-r--r-- | rust/src/medium_level_il/lift.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/rust/src/medium_level_il/lift.rs b/rust/src/medium_level_il/lift.rs index aee8139f..2f0d6653 100644 --- a/rust/src/medium_level_il/lift.rs +++ b/rust/src/medium_level_il/lift.rs @@ -154,6 +154,12 @@ pub enum MediumLevelILLiftedInstructionKind { SharedParamSlot(LiftedSharedParamSlot), Neg(LiftedUnaryOp), Not(LiftedUnaryOp), + Bswap(LiftedUnaryOp), + Popcnt(LiftedUnaryOp), + Clz(LiftedUnaryOp), + Ctz(LiftedUnaryOp), + Rbit(LiftedUnaryOp), + Cls(LiftedUnaryOp), Sx(LiftedUnaryOp), Zx(LiftedUnaryOp), LowPart(LiftedUnaryOp), @@ -313,6 +319,12 @@ impl MediumLevelILLiftedInstruction { StoreOutput(_) => "StoreOutput", Neg(_) => "Neg", Not(_) => "Not", + Bswap(_) => "Bswap", + Popcnt(_) => "Popcnt", + Clz(_) => "Clz", + Ctz(_) => "Ctz", + Rbit(_) => "Rbit", + Cls(_) => "Cls", Sx(_) => "Sx", Zx(_) => "Zx", LowPart(_) => "LowPart", @@ -542,7 +554,8 @@ impl MediumLevelILLiftedInstruction { ("params", Operand::ExprList(op.params.clone())), ("stack", Operand::Expr(*op.stack.clone())), ], - Neg(op) | Not(op) | Sx(op) | Zx(op) | LowPart(op) | BoolToInt(op) | UnimplMem(op) + Neg(op) | Not(op) | Bswap(op) | Popcnt(op) | Clz(op) | Ctz(op) | Rbit(op) | Cls(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) | Load(op) => { vec![("src", Operand::Expr(*op.src.clone()))] |
