Browse Source

x64: Fix lightuserdata comparisons.

Mike Pall 13 years ago
parent
commit
f1849fa928
3 changed files with 1022 additions and 1018 deletions
  1. 511 511
      src/buildvm_x64.h
  2. 507 507
      src/buildvm_x64win.h
  3. 4 0
      src/buildvm_x86.dasc

File diff suppressed because it is too large
+ 511 - 511
src/buildvm_x64.h


File diff suppressed because it is too large
+ 507 - 507
src/buildvm_x64win.h


+ 4 - 0
src/buildvm_x86.dasc

@@ -4022,6 +4022,10 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
       |  je <1				// Same GCobjs or pvalues?
       |  je <1				// Same GCobjs or pvalues?
       |  cmp RB, LJ_TISTABUD
       |  cmp RB, LJ_TISTABUD
       |  ja <2				// Different objects and not table/ud?
       |  ja <2				// Different objects and not table/ud?
+      |.if X64
+      |  cmp RB, LJ_TUDATA		// And not 64 bit lightuserdata.
+      |  jb <2
+      |.endif
       |
       |
       |  // Different tables or userdatas. Need to check __eq metamethod.
       |  // Different tables or userdatas. Need to check __eq metamethod.
       |  // Field metatable must be at same offset for GCtab and GCudata!
       |  // Field metatable must be at same offset for GCtab and GCudata!

Some files were not shown because too many files changed in this diff