Add a trapff instruction.
This is the floating point equivalent of trapif: Trap when a given condition is in the floating-point flags. Define Intel encodings comparable to the trapif encodings.
This commit is contained in:
@@ -270,6 +270,12 @@ pub enum InstructionData {
|
||||
arg: Value,
|
||||
code: ir::TrapCode,
|
||||
},
|
||||
FloatCondTrap {
|
||||
opcode: Opcode,
|
||||
cond: FloatCC,
|
||||
arg: Value,
|
||||
code: ir::TrapCode,
|
||||
},
|
||||
}
|
||||
|
||||
/// A variable list of `Value` operands used for function call arguments and passing arguments to
|
||||
|
||||
@@ -366,6 +366,7 @@ impl<'a> Verifier<'a> {
|
||||
Trap { .. } |
|
||||
CondTrap { .. } |
|
||||
IntCondTrap { .. } |
|
||||
FloatCondTrap { .. } |
|
||||
NullAry { .. } => {}
|
||||
}
|
||||
|
||||
|
||||
@@ -429,6 +429,7 @@ pub fn write_operands(
|
||||
Trap { code, .. } => write!(w, " {}", code),
|
||||
CondTrap { arg, code, .. } => write!(w, " {}, {}", arg, code),
|
||||
IntCondTrap { cond, arg, code, .. } => write!(w, " {} {}, {}", cond, arg, code),
|
||||
FloatCondTrap { cond, arg, code, .. } => write!(w, " {} {}, {}", cond, arg, code),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user