Remove trapif and trapff (#5162)
This branch removes the trapif and trapff instructions, in favor of using an explicit comparison and trapnz. This moves us closer to removing iflags and fflags, but introduces the need to implement instructions like iadd_cout in the x64 and aarch64 backends.
This commit is contained in:
@@ -75,9 +75,6 @@ fn define_control_flow(
|
||||
);
|
||||
}
|
||||
|
||||
let iflags: &TypeVar = &ValueType::Special(types::Flag::IFlags.into()).into();
|
||||
let fflags: &TypeVar = &ValueType::Special(types::Flag::FFlags.into()).into();
|
||||
|
||||
{
|
||||
let _i32 = &TypeVar::new(
|
||||
"i32",
|
||||
@@ -205,35 +202,6 @@ fn define_control_flow(
|
||||
.operands_in(vec![c, code])
|
||||
.can_trap(true),
|
||||
);
|
||||
|
||||
let Cond = &Operand::new("Cond", &imm.intcc);
|
||||
let f = &Operand::new("f", iflags);
|
||||
ig.push(
|
||||
Inst::new(
|
||||
"trapif",
|
||||
r#"
|
||||
Trap when condition is true in integer CPU flags.
|
||||
"#,
|
||||
&formats.int_cond_trap,
|
||||
)
|
||||
.operands_in(vec![Cond, f, code])
|
||||
.can_trap(true),
|
||||
);
|
||||
|
||||
let Cond = &Operand::new("Cond", &imm.floatcc);
|
||||
let f = &Operand::new("f", fflags);
|
||||
let code = &Operand::new("code", &imm.trapcode);
|
||||
ig.push(
|
||||
Inst::new(
|
||||
"trapff",
|
||||
r#"
|
||||
Trap when condition is true in floating point CPU flags.
|
||||
"#,
|
||||
&formats.float_cond_trap,
|
||||
)
|
||||
.operands_in(vec![Cond, f, code])
|
||||
.can_trap(true),
|
||||
);
|
||||
}
|
||||
|
||||
let rvals = &Operand::new("rvals", &entities.varargs).with_doc("return values");
|
||||
|
||||
Reference in New Issue
Block a user