Use with_flags for 128-bith arith in aarch64

Also move the `with_flags` bits and pieces to `prelude.isle` so it can
be shared between backends if necessary.
This commit is contained in:
Alex Crichton
2021-11-19 07:08:08 -08:00
parent 98ce029bbd
commit cbf539abb8
8 changed files with 437 additions and 212 deletions

View File

@@ -105,9 +105,9 @@
)
;; the actual addition is `adds` followed by `adc` which comprises the
;; low/high bits of the result
(value_regs
(alu_rrr (ALUOp.AddS64) x_lo y_lo)
(alu_rrr (ALUOp.Adc64) x_hi y_hi))))
(with_flags
(add64_with_flags x_lo y_lo)
(adc64 x_hi y_hi))))
;;;; Rules for `isub` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -156,6 +156,6 @@
)
;; the actual subtraction is `subs` followed by `sbc` which comprises
;; the low/high bits of the result
(value_regs
(alu_rrr (ALUOp.SubS64) x_lo y_lo)
(alu_rrr (ALUOp.Sbc64) x_hi y_hi))))
(with_flags
(sub64_with_flags x_lo y_lo)
(sbc64 x_hi y_hi))))