x64: Migrate brff and I128 branching instructions to ISLE (#4599)
https://github.com/bytecodealliance/wasmtime/pull/4599
This commit is contained in:
@@ -548,9 +548,7 @@
|
||||
And
|
||||
Or
|
||||
Xor
|
||||
Mul
|
||||
And8
|
||||
Or8))
|
||||
Mul))
|
||||
|
||||
(type UnaryRmROpcode extern
|
||||
(enum Bsr
|
||||
@@ -1074,6 +1072,13 @@
|
||||
(decl cc_invert (CC) CC)
|
||||
(extern constructor cc_invert cc_invert)
|
||||
|
||||
(decl floatcc_inverse (FloatCC) FloatCC)
|
||||
(extern constructor floatcc_inverse floatcc_inverse)
|
||||
|
||||
;; Fails if the argument is not either CC.NZ or CC.Z.
|
||||
(decl cc_nz_or_z (CC) CC)
|
||||
(extern extractor cc_nz_or_z cc_nz_or_z)
|
||||
|
||||
(type AvxOpcode extern
|
||||
(enum Vfmadd213ps
|
||||
Vfmadd213pd))
|
||||
@@ -3060,6 +3065,10 @@
|
||||
(rule (jmp_known target)
|
||||
(SideEffectNoResult.Inst (MInst.JmpKnown target)))
|
||||
|
||||
(decl jmp_if (CC MachLabel) ConsumesFlags)
|
||||
(rule (jmp_if cc taken)
|
||||
(ConsumesFlags.ConsumesFlagsSideEffect (MInst.JmpIf cc taken)))
|
||||
|
||||
;; Conditional jump based on the condition code.
|
||||
(decl jmp_cond (CC MachLabel MachLabel) ConsumesFlags)
|
||||
(rule (jmp_cond cc taken not_taken)
|
||||
@@ -3070,6 +3079,21 @@
|
||||
(rule (jmp_cond_icmp (IcmpCondResult.Condition producer cc) taken not_taken)
|
||||
(with_flags_side_effect producer (jmp_cond cc taken not_taken)))
|
||||
|
||||
;; Conditional jump based on the result of an fcmp.
|
||||
(decl jmp_cond_fcmp (FcmpCondResult MachLabel MachLabel) SideEffectNoResult)
|
||||
(rule (jmp_cond_fcmp (FcmpCondResult.Condition producer cc) taken not_taken)
|
||||
(with_flags_side_effect producer (jmp_cond cc taken not_taken)))
|
||||
(rule (jmp_cond_fcmp (FcmpCondResult.AndCondition producer cc1 cc2) taken not_taken)
|
||||
(with_flags_side_effect producer
|
||||
(consumes_flags_concat
|
||||
(jmp_if (cc_invert cc1) not_taken)
|
||||
(jmp_cond (cc_invert cc2) not_taken taken))))
|
||||
(rule (jmp_cond_fcmp (FcmpCondResult.OrCondition producer cc1 cc2) taken not_taken)
|
||||
(with_flags_side_effect producer
|
||||
(consumes_flags_concat
|
||||
(jmp_if cc1 taken)
|
||||
(jmp_cond cc2 taken not_taken))))
|
||||
|
||||
;;;; Comparisons ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(type IcmpCondResult (enum (Condition (producer ProducesFlags) (cc CC))))
|
||||
|
||||
Reference in New Issue
Block a user