Port Fence, IsNull/IsInvalid & Debugtrap to ISLE (AArch64) (#4548)
Ported the existing implementation of the following Opcodes for AArch64 to ISLE: - `Fence` - `IsNull` - `IsInvalid` - `Debugtrap` Copyright (c) 2022 Arm Limited
This commit is contained in:
@@ -1699,3 +1699,29 @@
|
||||
(let ((low_half Reg (uqxtn x (lane_size ty)))
|
||||
(result Reg (uqxtn2 low_half y (lane_size ty))))
|
||||
result))
|
||||
|
||||
;;;; Rules for `Fence` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(rule (lower (fence))
|
||||
(let ((_ Unit (emit (MInst.Fence))))
|
||||
(output_none)))
|
||||
|
||||
;;;; Rules for `IsNull` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(rule (lower (has_type out_ty (is_null x @ (value_type ty))))
|
||||
(with_flags (cmp_imm (operand_size ty) x (u8_into_imm12 0))
|
||||
(materialize_bool_result
|
||||
(ty_bits out_ty) (Cond.Eq))))
|
||||
|
||||
;;;; Rules for `IsInvalid` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(rule (lower (has_type out_ty (is_invalid x @ (value_type ty))))
|
||||
(with_flags (cmn_imm (operand_size ty) x (u8_into_imm12 1))
|
||||
(materialize_bool_result
|
||||
(ty_bits out_ty) (Cond.Eq))))
|
||||
|
||||
;;;; Rules for `Debugtrap` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(rule (lower (debugtrap))
|
||||
(let ((_ Unit (emit (MInst.Brk))))
|
||||
(output_none)))
|
||||
|
||||
Reference in New Issue
Block a user