Vector bitcast support (AArch64 & Interpreter) (#4820)
* Vector bitcast support (AArch64 & Interpreter) Implemented support for `bitcast` on vector values for AArch64 and the interpreter. Also corrected the verifier to ensure that the size, in bits, of the input and output types match for a `bitcast`, per the docs. Copyright (c) 2022 Arm Limited * `I128` same-type bitcast support Copyright (c) 2022 Arm Limited * Directly return input for 64-bit GPR<=>GPR bitcast Copyright (c) 2022 Arm Limited
This commit is contained in:
@@ -1738,6 +1738,13 @@
|
||||
(decl writable_zero_reg () WritableReg)
|
||||
(extern constructor writable_zero_reg writable_zero_reg)
|
||||
|
||||
;; Helper for emitting `MInst.Mov` instructions.
|
||||
(decl mov (Reg Type) Reg)
|
||||
(rule (mov src ty)
|
||||
(let ((dst WritableReg (temp_writable_reg $I64))
|
||||
(_ Unit (emit (MInst.Mov (operand_size ty) dst src))))
|
||||
dst))
|
||||
|
||||
;; Helper for emitting `MInst.MovZ` instructions.
|
||||
(decl movz (MoveWideConst OperandSize) Reg)
|
||||
(rule (movz imm size)
|
||||
@@ -2093,6 +2100,17 @@
|
||||
(_ Unit (emit (MInst.FpuRound op dst rn))))
|
||||
dst))
|
||||
|
||||
;; Helper for emitting `MInst.FpuMove64` and `MInst.FpuMove128` instructions.
|
||||
(decl fpu_move (Type Reg) Reg)
|
||||
(rule (fpu_move _ src)
|
||||
(let ((dst WritableReg (temp_writable_reg $I8X16))
|
||||
(_ Unit (emit (MInst.FpuMove128 dst src))))
|
||||
dst))
|
||||
(rule (fpu_move (fits_in_64 _) src)
|
||||
(let ((dst WritableReg (temp_writable_reg $F64))
|
||||
(_ Unit (emit (MInst.FpuMove64 dst src))))
|
||||
dst))
|
||||
|
||||
;; Helper for emitting `MInst.MovToFpu` instructions.
|
||||
(decl mov_to_fpu (Reg ScalarSize) Reg)
|
||||
(rule (mov_to_fpu x size)
|
||||
|
||||
Reference in New Issue
Block a user