]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
x64/LJ_GC64: Fix ipairs().
authorMike Pall <mike>
Wed, 10 Jun 2015 10:15:28 +0000 (12:15 +0200)
committerMike Pall <mike>
Wed, 10 Jun 2015 10:15:28 +0000 (12:15 +0200)
src/vm_x64.dasc

index 2b1c8d2dd4e1df8992334c2cbd0c218010d5cd57..e7e990ae27faed80952d1ac38e7d446c38cefcb9 100644 (file)
@@ -1435,9 +1435,16 @@ static void build_subroutines(BuildCtx *ctx)
   |  jmp ->fff_res2
   |2:  // Check for empty hash part first. Otherwise call C function.
   |  cmp dword TAB:RB->hmask, 0; je ->fff_res0
+  |.if X64WIN
+  |  mov TMPR, BASE
+  |  mov CARG2d, RAd
+  |  mov CARG1, TAB:RB
+  |  mov RB, TMPR
+  |.else
   |  mov CARG1, TAB:RB
   |  mov RB, BASE                      // Save BASE.
   |  mov CARG2d, RAd                   // Caveat: CARG2 == BASE
+  |.endif
   |  call extern lj_tab_getinth                // (GCtab *t, int32_t key)
   |  // cTValue * or NULL returned in eax (RD).
   |  mov BASE, RB