Fix pow() optimization inconsistencies.

This commit is contained in:
Mike Pall
2022-01-24 14:37:50 +01:00
parent c18acfe756
commit 9512d5c1ac
15 changed files with 114 additions and 205 deletions

View File

@@ -1477,11 +1477,11 @@ static void build_subroutines(BuildCtx *ctx)
|.endif
|.endmacro
|
|.macro math_extern2, func
|.macro math_extern2, name, func
|.if HFABI
| .ffunc_dd math_ .. func
| .ffunc_dd math_ .. name
|.else
| .ffunc_nn math_ .. func
| .ffunc_nn math_ .. name
|.endif
| .IOS mov RA, BASE
| bl extern func
@@ -1492,6 +1492,9 @@ static void build_subroutines(BuildCtx *ctx)
| b ->fff_restv
|.endif
|.endmacro
|.macro math_extern2, func
| math_extern2 func, func
|.endmacro
|
|.if FPU
| .ffunc_d math_sqrt
@@ -1537,7 +1540,7 @@ static void build_subroutines(BuildCtx *ctx)
| math_extern sinh
| math_extern cosh
| math_extern tanh
| math_extern2 pow
| math_extern2 pow, lj_vm_pow
| math_extern2 atan2
| math_extern2 fmod
|
@@ -3203,7 +3206,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
break;
case BC_POW:
| // NYI: (partial) integer arithmetic.
| ins_arithfp extern, extern pow
| ins_arithfp extern, extern lj_vm_pow
break;
case BC_CAT: