Disable FMA by default. Use -Ofma or jit.opt.start("+fma") to enable.

See the discussion in #918 for the rationale.
This commit is contained in:
Mike Pall
2022-12-07 18:38:22 +01:00
parent 7d5d4a1b1a
commit de2e1ca9d3
7 changed files with 35 additions and 6 deletions

View File

@@ -2636,7 +2636,9 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
|.macro ins_arithmod, res, reg1, reg2
| fdiv d2, reg1, reg2
| frintm d2, d2
| fmsub res, d2, reg2, reg1
| // Cannot use fmsub, because FMA is not enabled by default.
| fmul d2, d2, reg2
| fsub res, reg1, d2
|.endmacro
|
|.macro ins_arithdn, intins, fpins