diff options
author | Mike Pall <mike> | 2010-12-06 19:28:51 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-12-06 19:28:51 +0100 |
commit | b3c4c0810a38c472df2dc0564c18c752114a796e (patch) | |
tree | 2bf98720cb31624f84266301533995a1fab6b5ee /src | |
parent | 159f51d8113555853a3325462f802010d4aac024 (diff) | |
download | luajit-b3c4c0810a38c472df2dc0564c18c752114a796e.tar.gz luajit-b3c4c0810a38c472df2dc0564c18c752114a796e.tar.bz2 luajit-b3c4c0810a38c472df2dc0564c18c752114a796e.zip |
Add IRT_NUM support to XLOAD/XSTORE.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_asm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index e05de41e..096def55 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -1363,10 +1363,10 @@ static Reg asm_fuseload(ASMState *as, IRRef ref, RegSet allow) | |||
1363 | return RID_MRM; | 1363 | return RID_MRM; |
1364 | } | 1364 | } |
1365 | } else if (ir->o == IR_XLOAD) { | 1365 | } else if (ir->o == IR_XLOAD) { |
1366 | /* Generic fusion is only ok for 32 bit operand (but see asm_comp). | 1366 | /* Generic fusion is not ok for 8/16 bit operands (but see asm_comp). |
1367 | ** Fusing unaligned memory operands is ok on x86 (except for SIMD types). | 1367 | ** Fusing unaligned memory operands is ok on x86 (except for SIMD types). |
1368 | */ | 1368 | */ |
1369 | if ((irt_isint(ir->t) || irt_isaddr(ir->t)) && | 1369 | if ((!irt_typerange(ir->t, IRT_I8, IRT_U16)) && |
1370 | noconflict(as, ref, IR_XSTORE)) { | 1370 | noconflict(as, ref, IR_XSTORE)) { |
1371 | asm_fusexref(as, ir->op1, xallow); | 1371 | asm_fusexref(as, ir->op1, xallow); |
1372 | return RID_MRM; | 1372 | return RID_MRM; |
@@ -1995,6 +1995,7 @@ static void asm_fxload(ASMState *as, IRIns *ir) | |||
1995 | case IRT_U8: xo = XO_MOVZXb; break; | 1995 | case IRT_U8: xo = XO_MOVZXb; break; |
1996 | case IRT_I16: xo = XO_MOVSXw; break; | 1996 | case IRT_I16: xo = XO_MOVSXw; break; |
1997 | case IRT_U16: xo = XO_MOVZXw; break; | 1997 | case IRT_U16: xo = XO_MOVZXw; break; |
1998 | case IRT_NUM: xo = XMM_MOVRM(as); break; | ||
1998 | default: | 1999 | default: |
1999 | if (LJ_64 && irt_is64(ir->t)) | 2000 | if (LJ_64 && irt_is64(ir->t)) |
2000 | dest |= REX_64; | 2001 | dest |= REX_64; |
@@ -2029,6 +2030,7 @@ static void asm_fxstore(ASMState *as, IRIns *ir) | |||
2029 | switch (irt_type(ir->t)) { | 2030 | switch (irt_type(ir->t)) { |
2030 | case IRT_I8: case IRT_U8: xo = XO_MOVtob; src |= FORCE_REX; break; | 2031 | case IRT_I8: case IRT_U8: xo = XO_MOVtob; src |= FORCE_REX; break; |
2031 | case IRT_I16: case IRT_U16: xo = XO_MOVtow; break; | 2032 | case IRT_I16: case IRT_U16: xo = XO_MOVtow; break; |
2033 | case IRT_NUM: xo = XO_MOVSDto; break; | ||
2032 | #if LJ_64 | 2034 | #if LJ_64 |
2033 | case IRT_LIGHTUD: lua_assert(0); /* NYI: mask 64 bit lightuserdata. */ | 2035 | case IRT_LIGHTUD: lua_assert(0); /* NYI: mask 64 bit lightuserdata. */ |
2034 | #endif | 2036 | #endif |