cranelift: Implement ineg.i128 for everyone (#5129)

* cranelift: Add `ineg` runtests

* aarch64: Implement `ineg.i128`

* x64: Implement `ineg.i128`

* riscv: Implement `ineg.i128`

* fuzzgen: Enable `ineg.i128`
This commit is contained in:
Afonso Bordado
2022-10-29 00:10:00 +01:00
committed by GitHub
parent 81f7ef7fbe
commit 879b52825f
9 changed files with 127 additions and 20 deletions

View File

@@ -2917,6 +2917,14 @@
(size OperandSize (operand_size_of_type_32_64 ty))
(_ Unit (emit (MInst.Neg size src dst))))
dst))
;; Helper for creating `neg` instructions whose flags are also used.
(decl x64_neg_paired (Type Gpr) ProducesFlags)
(rule (x64_neg_paired ty src)
(let ((dst WritableGpr (temp_writable_gpr))
(size OperandSize (operand_size_of_type_32_64 ty))
(inst MInst (MInst.Neg size src dst)))
(ProducesFlags.ProducesFlagsReturnsResultWithConsumer inst dst)))
(decl x64_lea (SyntheticAmode) Gpr)
(rule (x64_lea addr)