x64: port atomic_cas to ISLE (#4223)

This commit is contained in:
Andrew Brown
2022-06-06 13:20:33 -07:00
committed by GitHub
parent d8ba1ddc86
commit 6df56e6aa6
4 changed files with 23 additions and 26 deletions

View File

@@ -2812,3 +2812,9 @@
(side_effect (side_effect_concat
(x64_movrm ty (to_amode flags address (zero_offset)) value)
(x64_mfence))))
;; Rules for `atomic_cas` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(rule (lower (has_type (and (fits_in_64 ty) (ty_int _))
(atomic_cas flags address expected replacement)))
(x64_cmpxchg ty expected replacement (to_amode flags address (zero_offset))))