Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions rust/src/medium_level_il/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,7 @@ impl MediumLevelILInstruction {
| MLIL_CALL_PARAM_SSA
| MLIL_CALL_OUTPUT_SSA
| MLIL_MEMORY_INTRINSIC_OUTPUT_SSA
| MLIL_MEMORY_INTRINSIC_SSA => {
unimplemented!()
}
| MLIL_MEMORY_INTRINSIC_SSA => Op::NotYetImplemented,
};

Self {
Expand All @@ -633,6 +631,7 @@ impl MediumLevelILInstruction {
Bp => Lifted::Bp,
Undef => Lifted::Undef,
Unimpl => Lifted::Unimpl,
NotYetImplemented => Lifted::NotYetImplemented,
If(op) => Lifted::If(LiftedIf {
condition: self.lift_operand(op.condition),
dest_true: op.dest_true,
Expand Down Expand Up @@ -1629,6 +1628,9 @@ pub enum MediumLevelILInstructionKind {
VarSsaField(VarSsaField),
VarAliasedField(VarSsaField),
Trap(Trap),
// A placeholder for instructions that the Rust bindings do not yet support.
// Distinct from `Unimpl` as that is a valid instruction.
NotYetImplemented,
}

fn get_float(value: u64, size: usize) -> f64 {
Expand Down
6 changes: 5 additions & 1 deletion rust/src/medium_level_il/lift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ pub enum MediumLevelILLiftedInstructionKind {
VarSsaField(VarSsaField),
VarAliasedField(VarSsaField),
Trap(Trap),
// A placeholder for instructions that the Rust bindings do not yet support.
// Distinct from `Unimpl` as that is a valid instruction.
NotYetImplemented,
}

impl MediumLevelILLiftedInstruction {
Expand All @@ -186,6 +189,7 @@ impl MediumLevelILLiftedInstruction {
Bp => "Bp",
Undef => "Undef",
Unimpl => "Unimpl",
NotYetImplemented => "NotYetImplemented",
If(_) => "If",
FloatConst(_) => "FloatConst",
Const(_) => "Const",
Expand Down Expand Up @@ -318,7 +322,7 @@ impl MediumLevelILLiftedInstruction {
use MediumLevelILLiftedInstructionKind::*;
use MediumLevelILLiftedOperand as Operand;
match &self.kind {
Nop | Noret | Bp | Undef | Unimpl => vec![],
Nop | Noret | Bp | Undef | Unimpl | NotYetImplemented => vec![],
If(op) => vec![
("condition", Operand::Expr(*op.condition.clone())),
("dest_true", Operand::InstructionIndex(op.dest_true)),
Expand Down
Loading