From 296f0ca8d7c063cca1b6ddc0a48ceddff09d53b1 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Thu, 31 Mar 2016 04:17:21 +0200 Subject: [PATCH] Windows/x64/LJ_GC64: Fix math.frexp() and math.modf() (again). Thanks to Peter Cawley. --- src/vm_x64.dasc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/vm_x64.dasc b/src/vm_x64.dasc index 99ebb9b9..c7a7740b 100644 --- a/src/vm_x64.dasc +++ b/src/vm_x64.dasc @@ -1804,12 +1804,12 @@ static void build_subroutines(BuildCtx *ctx) | jmp ->fff_res1 | |.ffunc_n math_frexp + | mov RB, BASE |.if X64WIN - | lea CARG2, TMP1 + | lea CARG2, TMP1 // Caveat: CARG2 == BASE |.else | lea CARG1, TMP1 |.endif - | mov RB, BASE | call extern frexp | mov BASE, RB | mov RBd, TMP1d @@ -1826,13 +1826,12 @@ static void build_subroutines(BuildCtx *ctx) | jmp ->fff_res | |.ffunc_n math_modf + | mov RB, BASE |.if X64WIN - | lea CARG2, [BASE-16] + | lea CARG2, [BASE-16] // Caveat: CARG2 == BASE |.else | lea CARG1, [BASE-16] |.endif - | mov PC, [BASE-8] - | mov RB, BASE | call extern modf | mov BASE, RB | mov PC, [BASE-8]