x64: port atomic_cas to ISLE (#4223)
This commit is contained in:
@@ -1058,6 +1058,11 @@
|
||||
(decl encode_fcmp_imm (FcmpImm) u8)
|
||||
(extern constructor encode_fcmp_imm encode_fcmp_imm)
|
||||
|
||||
;;;; Registers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(decl rax () WritableGpr)
|
||||
(extern constructor rax rax)
|
||||
|
||||
;;;; Newtypes for Different Register Classes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(type Gpr (primitive Gpr))
|
||||
@@ -2876,6 +2881,11 @@
|
||||
(rule (x64_mfence)
|
||||
(SideEffectNoResult.Inst (MInst.Fence (FenceKind.MFence))))
|
||||
|
||||
(decl x64_cmpxchg (Type Gpr Gpr SyntheticAmode) Gpr)
|
||||
(rule (x64_cmpxchg ty expected replacement addr)
|
||||
(let ((_ Unit (emit (MInst.LockCmpxchg ty replacement expected addr (rax)))))
|
||||
(rax)))
|
||||
|
||||
;;;; Automatic conversions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(convert Gpr InstOutput output_gpr)
|
||||
|
||||
Reference in New Issue
Block a user