diff options
author | Mike Pall <mike> | 2010-02-24 07:09:34 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-02-24 07:09:34 +0100 |
commit | 4c9f71be5d4449b717870092839c47a1d5db0dca (patch) | |
tree | ace2d0a3cf4756cc5ac7607c21304f7f7baffd09 /src/lj_snap.c | |
parent | e46f4c8a11bcb2ba76d445e34030ab04ba12668d (diff) | |
download | luajit-4c9f71be5d4449b717870092839c47a1d5db0dca.tar.gz luajit-4c9f71be5d4449b717870092839c47a1d5db0dca.tar.bz2 luajit-4c9f71be5d4449b717870092839c47a1d5db0dca.zip |
Major 32/64 bit cleanups in assembler and exit handling.
Add 64 bit lightuserdata handling. Keep the tagged 64 bit value.
Allocate/save/restore 64 bit spill slots for 64 bit lightuserdata.
Fix code generation for 64 bit loads/stores/moves/compares.
Fix code generation for stack pointer adjustments.
Add fixed spill slot definitions for x64. Reduce reserved spill slots.
Disable STRREF + ADD fusion in 64 bit mode (avoid negative 32 bit ofs).
Diffstat (limited to 'src/lj_snap.c')
-rw-r--r-- | src/lj_snap.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c index 2b82e672..86890a26 100644 --- a/src/lj_snap.c +++ b/src/lj_snap.c | |||
@@ -279,6 +279,11 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr) | |||
279 | setintV(o, *sps); | 279 | setintV(o, *sps); |
280 | } else if (irt_isnum(t)) { | 280 | } else if (irt_isnum(t)) { |
281 | o->u64 = *(uint64_t *)sps; | 281 | o->u64 = *(uint64_t *)sps; |
282 | #if LJ_64 | ||
283 | } else if (irt_islightud(t)) { | ||
284 | /* 64 bit lightuserdata which may escape already has the tag bits. */ | ||
285 | o->u64 = *(uint64_t *)sps; | ||
286 | #endif | ||
282 | } else { | 287 | } else { |
283 | lua_assert(!irt_ispri(t)); /* PRI refs never have a spill slot. */ | 288 | lua_assert(!irt_ispri(t)); /* PRI refs never have a spill slot. */ |
284 | setgcrefi(o->gcr, *sps); | 289 | setgcrefi(o->gcr, *sps); |
@@ -291,6 +296,11 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr) | |||
291 | setintV(o, ex->gpr[r-RID_MIN_GPR]); | 296 | setintV(o, ex->gpr[r-RID_MIN_GPR]); |
292 | } else if (irt_isnum(t)) { | 297 | } else if (irt_isnum(t)) { |
293 | setnumV(o, ex->fpr[r-RID_MIN_FPR]); | 298 | setnumV(o, ex->fpr[r-RID_MIN_FPR]); |
299 | #if LJ_64 | ||
300 | } else if (irt_islightud(t)) { | ||
301 | /* 64 bit lightuserdata which may escape already has the tag bits. */ | ||
302 | o->u64 = ex->gpr[r-RID_MIN_GPR]; | ||
303 | #endif | ||
294 | } else { | 304 | } else { |
295 | if (!irt_ispri(t)) | 305 | if (!irt_ispri(t)) |
296 | setgcrefi(o->gcr, ex->gpr[r-RID_MIN_GPR]); | 306 | setgcrefi(o->gcr, ex->gpr[r-RID_MIN_GPR]); |