x64: Migrate selectif and selectif_spectre_guard to ISLE (#4619)

https://github.com/bytecodealliance/wasmtime/pull/4619
This commit is contained in:
Trevor Elliott
2022-08-05 09:36:11 -07:00
committed by GitHub
parent 1ce9e8aa5f
commit 0c2a48f682
4 changed files with 26 additions and 231 deletions

View File

@@ -2945,3 +2945,11 @@
(rule (lower_branch (br_table idx @ (value_type ty) _ _) (jump_table_targets default_target jt_targets))
(side_effect (jmp_table_seq ty idx default_target jt_targets)))
;; Rules for `selectif` and `selectif_spectre_guard` ;;;;;;;;;;;;;;;;;;;;;;;;;;;
(rule (lower (selectif cc (ifcmp a b) x y))
(select_icmp (emit_cmp cc a b) x y))
(rule (lower (selectif_spectre_guard cc (ifcmp a b) x y))
(select_icmp (emit_cmp cc a b) x y))