Port Shuffle to ISLE (AArch64) (#4596)
* Port `Shuffle` to ISLE (AArch64) Ported the existing implementation of `Shuffle` for AArch64 to ISLE. Copyright (c) 2022 Arm Limited * Cleanup by shadowing `rn`, `rn2`, and `_` Copyright (c) 2022 Arm Limited
This commit is contained in:
@@ -1428,6 +1428,9 @@
|
||||
(decl xreg (u8) Reg)
|
||||
(extern constructor xreg xreg)
|
||||
|
||||
(decl writable_vreg (u8) WritableReg)
|
||||
(extern constructor writable_vreg writable_vreg)
|
||||
|
||||
(decl writable_xreg (u8) WritableReg)
|
||||
(extern constructor writable_xreg writable_xreg)
|
||||
|
||||
@@ -1647,6 +1650,26 @@
|
||||
(_ Unit (emit (MInst.VecTbl dst rn rm is_extension))))
|
||||
dst))
|
||||
|
||||
;; Helper for emitting `MInst.VecTbl2` instructions.
|
||||
;; - 2 register table vector lookups require consecutive table registers;
|
||||
;; we satisfy this constraint by hardcoding the usage of v30 and v31.
|
||||
;; - Make sure that both args are in virtual regs, since it is not guaranteed
|
||||
;; that we can get them safely to the temporaries if either is in a real
|
||||
;; register.
|
||||
(decl vec_tbl2 (Reg Reg Reg bool Type) Reg)
|
||||
(rule (vec_tbl2 rn rn2 rm is_extension ty)
|
||||
(let (
|
||||
(temp WritableReg (writable_vreg 30))
|
||||
(temp2 WritableReg (writable_vreg 31))
|
||||
(dst WritableReg (temp_writable_reg $I8X16))
|
||||
(rn Reg (ensure_in_vreg rn ty))
|
||||
(rn2 Reg (ensure_in_vreg rn2 ty))
|
||||
(_ Unit (emit (MInst.FpuMove128 temp rn)))
|
||||
(_ Unit (emit (MInst.FpuMove128 temp2 rn2)))
|
||||
(_ Unit (emit (MInst.VecTbl2 dst temp temp2 rm is_extension)))
|
||||
)
|
||||
dst))
|
||||
|
||||
;; Helper for emitting `MInst.VecRRRLong` instructions.
|
||||
(decl vec_rrr_long (VecRRRLongOp Reg Reg bool) Reg)
|
||||
(rule (vec_rrr_long op src1 src2 high_half)
|
||||
@@ -2325,6 +2348,11 @@
|
||||
(if-let addr_reg (amode_is_reg addr))
|
||||
addr_reg)
|
||||
|
||||
;; Lower a constant f128.
|
||||
(decl constant_f128 (u128) Reg)
|
||||
;; TODO: Port lower_constant_f128() to ISLE.
|
||||
(extern constructor constant_f128 constant_f128)
|
||||
|
||||
;; Lower a vector splat with a constant parameter.
|
||||
(decl splat_const (u64 VectorSize) Reg)
|
||||
;; TODO: Port lower_splat_const() to ISLE.
|
||||
|
||||
Reference in New Issue
Block a user