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

@@ -71,9 +71,11 @@
;;;; Rules for `ineg` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; `i64` and smaller.
(rule (lower (has_type (fits_in_64 ty) (ineg x)))
(rule 1 (lower (has_type (fits_in_64 ty) (ineg x)))
(alu_rrr (AluOPRRR.Sub) (zero_reg) x))
(rule 2 (lower (has_type $I128 (ineg x)))
(i128_sub (value_regs_zero) x))
;;;; Rules for `imul` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;