From 1b16e7ce3c529f9bf7aafe76448c769d865c1d90 Mon Sep 17 00:00:00 2001 From: Michael Munday Date: Thu, 5 Jan 2017 10:50:17 -0500 Subject: [PATCH] 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. --- src/vm_s390x.dasc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vm_s390x.dasc b/src/vm_s390x.dasc index 84dffec2..9efd5b09 100644 --- a/src/vm_s390x.dasc +++ b/src/vm_s390x.dasc @@ -1062,8 +1062,8 @@ static void build_subroutines(BuildCtx *ctx) | .ffunc_2 name | lg TMPR1, 0(BASE) | lg TMPR2, 8(BASE) - | ld f0, 0(BASE) - | ld f1, 8(BASE) + | ld FARG1, 0(BASE) + | ld FARG2, 8(BASE) | checknumtp TMPR1, ->fff_fallback | checknumtp TMPR2, ->fff_fallback |.endmacro @@ -1457,7 +1457,7 @@ static void build_subroutines(BuildCtx *ctx) |.ffunc math_log | chi NARGS:RD, 1+1; jne ->fff_fallback // Exactly one argument. | lg TMPR2, 0(BASE) - | ld f0, 0(BASE) + | ld FARG1, 0(BASE) | checknumtp TMPR2, ->fff_fallback | lgr RB, BASE | brasl r14, extern log @@ -1497,7 +1497,7 @@ static void build_subroutines(BuildCtx *ctx) | |.ffunc_2 math_ldexp | lg TMPR2, 0(BASE) - | ld f0, 0(BASE) + | ld FARG1, 0(BASE) | lg CARG1, 8(BASE) | checknumtp TMPR2, ->fff_fallback | checkinttp CARG1, ->fff_fallback