Fix math.pow.

The second floating point argument is placed into f2, not f1.
Use the macros FARG{1,2} instead of using the registers directly.
This commit is contained in:
Michael Munday 2017-01-05 10:50:17 -05:00
parent 3da26860b7
commit 1b16e7ce3c

View File

@ -1062,8 +1062,8 @@ static void build_subroutines(BuildCtx *ctx)
| .ffunc_2 name | .ffunc_2 name
| lg TMPR1, 0(BASE) | lg TMPR1, 0(BASE)
| lg TMPR2, 8(BASE) | lg TMPR2, 8(BASE)
| ld f0, 0(BASE) | ld FARG1, 0(BASE)
| ld f1, 8(BASE) | ld FARG2, 8(BASE)
| checknumtp TMPR1, ->fff_fallback | checknumtp TMPR1, ->fff_fallback
| checknumtp TMPR2, ->fff_fallback | checknumtp TMPR2, ->fff_fallback
|.endmacro |.endmacro
@ -1457,7 +1457,7 @@ static void build_subroutines(BuildCtx *ctx)
|.ffunc math_log |.ffunc math_log
| chi NARGS:RD, 1+1; jne ->fff_fallback // Exactly one argument. | chi NARGS:RD, 1+1; jne ->fff_fallback // Exactly one argument.
| lg TMPR2, 0(BASE) | lg TMPR2, 0(BASE)
| ld f0, 0(BASE) | ld FARG1, 0(BASE)
| checknumtp TMPR2, ->fff_fallback | checknumtp TMPR2, ->fff_fallback
| lgr RB, BASE | lgr RB, BASE
| brasl r14, extern log | brasl r14, extern log
@ -1497,7 +1497,7 @@ static void build_subroutines(BuildCtx *ctx)
| |
|.ffunc_2 math_ldexp |.ffunc_2 math_ldexp
| lg TMPR2, 0(BASE) | lg TMPR2, 0(BASE)
| ld f0, 0(BASE) | ld FARG1, 0(BASE)
| lg CARG1, 8(BASE) | lg CARG1, 8(BASE)
| checknumtp TMPR2, ->fff_fallback | checknumtp TMPR2, ->fff_fallback
| checkinttp CARG1, ->fff_fallback | checkinttp CARG1, ->fff_fallback