Implement iabs in ISLE (AArch64) (#4399)
* Implement `iabs` in ISLE (AArch64) Converts the existing implementation of `iabs` for AArch64 into ISLE, and fixes support for `iabs` on scalar values. Copyright (c) 2022 Arm Limited. * Improve scalar `iabs` implementation. Also introduces `CSNeg` instruction. Copyright (c) 2022 Arm Limited
This commit is contained in:
@@ -669,6 +669,11 @@ fn aarch64_get_operands<F: Fn(VReg) -> VReg>(inst: &Inst, collector: &mut Operan
|
||||
collector.reg_use(rn);
|
||||
collector.reg_use(rm);
|
||||
}
|
||||
&Inst::CSNeg { rd, rn, rm, .. } => {
|
||||
collector.reg_def(rd);
|
||||
collector.reg_use(rn);
|
||||
collector.reg_use(rm);
|
||||
}
|
||||
&Inst::CSet { rd, .. } | &Inst::CSetm { rd, .. } => {
|
||||
collector.reg_def(rd);
|
||||
}
|
||||
@@ -1510,6 +1515,13 @@ impl Inst {
|
||||
let cond = cond.pretty_print(0, allocs);
|
||||
format!("csel {}, {}, {}, {}", rd, rn, rm, cond)
|
||||
}
|
||||
&Inst::CSNeg { rd, rn, rm, cond } => {
|
||||
let rd = pretty_print_ireg(rd.to_reg(), OperandSize::Size64, allocs);
|
||||
let rn = pretty_print_ireg(rn, OperandSize::Size64, allocs);
|
||||
let rm = pretty_print_ireg(rm, OperandSize::Size64, allocs);
|
||||
let cond = cond.pretty_print(0, allocs);
|
||||
format!("csneg {}, {}, {}, {}", rd, rn, rm, cond)
|
||||
}
|
||||
&Inst::CSet { rd, cond } => {
|
||||
let rd = pretty_print_ireg(rd.to_reg(), OperandSize::Size64, allocs);
|
||||
let cond = cond.pretty_print(0, allocs);
|
||||
|
||||
Reference in New Issue
Block a user