]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
x64/LJ_GC64: Fix setmetatable().
authorMike Pall <mike>
Mon, 25 May 2015 14:31:52 +0000 (16:31 +0200)
committerMike Pall <mike>
Mon, 25 May 2015 14:31:52 +0000 (16:31 +0200)
src/vm_x64.dasc

index bcd3184d6891c880aa60990d8259ead99a64d318..bc55d9094f1889ac112b20b62720cc9201ddadb4 100644 (file)
@@ -1247,9 +1247,9 @@ static void build_subroutines(BuildCtx *ctx)
   |  checktab TAB:RB, ->fff_fallback
   |  // Fast path: no mt for table yet and not clearing the mt.
   |  cmp aword TAB:RB->metatable, 0; jne ->fff_fallback
-  |  mov TAB:RC, [BASE+8]
-  |  checktab TAB:RC, ->fff_fallback
-  |  mov TAB:RB->metatable, TAB:RC
+  |  mov TAB:RA, [BASE+8]
+  |  checktab TAB:RA, ->fff_fallback
+  |  mov TAB:RB->metatable, TAB:RA
   |  mov PC, [BASE-8]
   |  mov [BASE-16], TAB:TMPR                   // Return original table.
   |  test byte TAB:RB->marked, LJ_GC_BLACK     // isblack(table)