aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2010-02-24 01:23:52 +0100
committerMike Pall <mike>2010-02-24 01:23:52 +0100
commit47da0d8018c6fb512740be87fdc8a71c4b87d892 (patch)
tree59afc3f80f4eac8be5eb23694ca276cbf99d6956 /src
parent857f538eacdb2c45913cd8c32f3c0d8a6f273f50 (diff)
downloadluajit-47da0d8018c6fb512740be87fdc8a71c4b87d892.tar.gz
luajit-47da0d8018c6fb512740be87fdc8a71c4b87d892.tar.bz2
luajit-47da0d8018c6fb512740be87fdc8a71c4b87d892.zip
Fix type() implementation for x64 lightuserdata.
Diffstat (limited to 'src')
-rw-r--r--src/buildvm_x86.dasc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc
index 0d97d01c..1e7331d2 100644
--- a/src/buildvm_x86.dasc
+++ b/src/buildvm_x86.dasc
@@ -1263,6 +1263,12 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
1263 | 1263 |
1264 |.ffunc_1 type 1264 |.ffunc_1 type
1265 | mov RB, [BASE+4] 1265 | mov RB, [BASE+4]
1266 |.if X64
1267 | mov RA, RB
1268 | sar RA, 15
1269 | cmp RA, -2
1270 | je >3
1271 |.endif
1266 | mov RC, ~LJ_TNUMX 1272 | mov RC, ~LJ_TNUMX
1267 | not RB 1273 | not RB
1268 | cmp RC, RB 1274 | cmp RC, RB
@@ -1271,12 +1277,18 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
1271 ||} else { 1277 ||} else {
1272 | jbe >1; mov RC, RB; 1: 1278 | jbe >1; mov RC, RB; 1:
1273 ||} 1279 ||}
1280 |2:
1274 | mov CFUNC:RB, [BASE-8] 1281 | mov CFUNC:RB, [BASE-8]
1275 | mov STR:RC, [CFUNC:RB+RC*8+((char *)(&((GCfuncC *)0)->upvalue))] 1282 | mov STR:RC, [CFUNC:RB+RC*8+((char *)(&((GCfuncC *)0)->upvalue))]
1276 | mov PC, [BASE-4] 1283 | mov PC, [BASE-4]
1277 | mov dword [BASE-4], LJ_TSTR 1284 | mov dword [BASE-4], LJ_TSTR
1278 | mov [BASE-8], STR:RC 1285 | mov [BASE-8], STR:RC
1279 | jmp ->fff_res1 1286 | jmp ->fff_res1
1287 |.if X64
1288 |3:
1289 | mov RC, ~LJ_TLIGHTUD
1290 | jmp <2
1291 |.endif
1280 | 1292 |
1281 |//-- Base library: getters and setters --------------------------------- 1293 |//-- Base library: getters and setters ---------------------------------
1282 | 1294 |