[codegen] add encodings for iadd carry variants (#961)

* [codegen] add encodings for iadd carry variants

Add encodings for iadd carry variants (iadd_cout, iadd_cin, iadd_carry)
for x86_32, enabling the legalization for iadd.i64 to work.

* [codegen] remove support for iadd carry variants on riscv

Previously, the carry variants of iadd (iadd_cin, iadd_cout and
iadd_carry) were being legalized for isa/riscv since RISC architectures
lack a flags register.

This forced us to return and accept booleans for these operations, which
proved to be problematic and inconvenient, especially for x86.

This commit removes support for said statements and all dependent
statements for isa/riscv so that we can work on a better legalization
strategy in the future.

* [codegen] change operand type from bool to iflag for iadd carry variants

The type of the carry operands for the carry variants of the iadd
instruction (iadd_cin, iadd_cout, iadd_carry) was bool for compatibility
reasons for isa/riscv. Since support for these instructions on RISC
architectures has been temporarily suspended, we can safely change the
type to iflags.
This commit is contained in:
Ujjwal Sharma
2019-09-05 18:33:13 +05:30
committed by Benjamin Bouvier
parent 7e398af999
commit ea919489ee
9 changed files with 84 additions and 33 deletions

View File

@@ -1864,8 +1864,8 @@ pub fn define(
let a = &operand("a", iB);
let x = &operand("x", iB);
let y = &operand("y", iB);
let c_in = &operand_doc("c_in", b1, "Input carry flag");
let c_out = &operand_doc("c_out", b1, "Output carry flag");
let c_in = &operand_doc("c_in", iflags, "Input carry flag");
let c_out = &operand_doc("c_out", iflags, "Output carry flag");
let b_in = &operand_doc("b_in", b1, "Input borrow flag");
let b_out = &operand_doc("b_out", b1, "Output borrow flag");