Browse Source

Windows/x64/LJ_GC64: Fix math.frexp() and math.modf().

Thanks to Eddie Edwards.
Mike Pall 9 years ago
parent
commit
339a1fd696
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/vm_x64.dasc

+ 8 - 0
src/vm_x64.dasc

@@ -1804,7 +1804,11 @@ static void build_subroutines(BuildCtx *ctx)
   |  jmp ->fff_res1
   |
   |.ffunc_n math_frexp
+  |.if X64WIN
+  |  lea CARG2, TMP1
+  |.else
   |  lea CARG1, TMP1
+  |.endif
   |  mov RB, BASE
   |  call extern frexp
   |  mov BASE, RB
@@ -1822,7 +1826,11 @@ static void build_subroutines(BuildCtx *ctx)
   |  jmp ->fff_res
   |
   |.ffunc_n math_modf
+  |.if X64WIN
+  |  lea CARG2, [BASE-16]
+  |.else
   |  lea CARG1, [BASE-16]
+  |.endif
   |  mov PC, [BASE-8]
   |  mov RB, BASE
   |  call extern modf