[codegen] add new recipe "rout" (#1014)
* [codegen] add new recipe "rout" Add a new recipe "rout" intended to be used by arithematic operations that output flags, currently being used for `iadd_cout` and `isub_bout`. Fixes: https://github.com/CraneStation/cranelift/issues/1009
This commit is contained in:
committed by
Benjamin Bouvier
parent
ac2ca6116b
commit
345b2dc0cc
@@ -2548,7 +2548,24 @@ pub(crate) fn define<'shared>(
|
||||
),
|
||||
);
|
||||
|
||||
// Adding with carry
|
||||
// Arithematic with flag I/O.
|
||||
|
||||
// XX /r, MR form. Add two GPR registers and set carry flag.
|
||||
recipes.add_template_recipe(
|
||||
EncodingRecipeBuilder::new("rout", f_binary, 1)
|
||||
.operands_in(vec![gpr, gpr])
|
||||
.operands_out(vec![
|
||||
OperandConstraint::TiedInput(0),
|
||||
OperandConstraint::FixedReg(reg_rflags),
|
||||
])
|
||||
.clobbers_flags(true)
|
||||
.emit(
|
||||
r#"
|
||||
{{PUT_OP}}(bits, rex2(in_reg0, in_reg1), sink);
|
||||
modrm_rr(in_reg0, in_reg1, sink);
|
||||
"#,
|
||||
),
|
||||
);
|
||||
|
||||
// XX /r, MR form. Add two GPR registers and get carry flag.
|
||||
recipes.add_template_recipe(
|
||||
|
||||
Reference in New Issue
Block a user