diff options
Diffstat (limited to 'src/lj_asm.c')
-rw-r--r-- | src/lj_asm.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index df94933a..a9b87821 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -1357,7 +1357,8 @@ static Reg asm_fuseload(ASMState *as, IRRef ref, RegSet allow) | |||
1357 | /* Generic fusion is only ok for 32 bit operand (but see asm_comp). | 1357 | /* Generic fusion is only ok for 32 bit operand (but see asm_comp). |
1358 | ** Fusing unaligned memory operands is ok on x86 (except for SIMD types). | 1358 | ** Fusing unaligned memory operands is ok on x86 (except for SIMD types). |
1359 | */ | 1359 | */ |
1360 | if (irt_isint(ir->t) || irt_isaddr(ir->t)) { | 1360 | if ((irt_isint(ir->t) || irt_isaddr(ir->t)) && |
1361 | noconflict(as, ref, IR_XSTORE)) { | ||
1361 | asm_fusexref(as, IR(ir->op1), xallow); | 1362 | asm_fusexref(as, IR(ir->op1), xallow); |
1362 | return RID_MRM; | 1363 | return RID_MRM; |
1363 | } | 1364 | } |
@@ -1978,7 +1979,7 @@ static void asm_fxload(ASMState *as, IRIns *ir) | |||
1978 | emit_mrm(as, xo, dest, RID_MRM); | 1979 | emit_mrm(as, xo, dest, RID_MRM); |
1979 | } | 1980 | } |
1980 | 1981 | ||
1981 | static void asm_fstore(ASMState *as, IRIns *ir) | 1982 | static void asm_fxstore(ASMState *as, IRIns *ir) |
1982 | { | 1983 | { |
1983 | RegSet allow = RSET_GPR; | 1984 | RegSet allow = RSET_GPR; |
1984 | Reg src = RID_NONE; | 1985 | Reg src = RID_NONE; |
@@ -1991,7 +1992,11 @@ static void asm_fstore(ASMState *as, IRIns *ir) | |||
1991 | src = ra_alloc1(as, ir->op2, allow8); | 1992 | src = ra_alloc1(as, ir->op2, allow8); |
1992 | rset_clear(allow, src); | 1993 | rset_clear(allow, src); |
1993 | } | 1994 | } |
1994 | asm_fusefref(as, IR(ir->op1), allow); | 1995 | if (ir->o == IR_FSTORE) |
1996 | asm_fusefref(as, IR(ir->op1), allow); | ||
1997 | else | ||
1998 | asm_fusexref(as, IR(ir->op1), allow); | ||
1999 | /* ir->op2 is ignored -- unaligned stores are ok on x86. */ | ||
1995 | if (ra_hasreg(src)) { | 2000 | if (ra_hasreg(src)) { |
1996 | x86Op xo; | 2001 | x86Op xo; |
1997 | switch (irt_type(ir->t)) { | 2002 | switch (irt_type(ir->t)) { |
@@ -3467,7 +3472,7 @@ static void asm_ir(ASMState *as, IRIns *ir) | |||
3467 | case IR_SLOAD: asm_sload(as, ir); break; | 3472 | case IR_SLOAD: asm_sload(as, ir); break; |
3468 | 3473 | ||
3469 | case IR_ASTORE: case IR_HSTORE: case IR_USTORE: asm_ahustore(as, ir); break; | 3474 | case IR_ASTORE: case IR_HSTORE: case IR_USTORE: asm_ahustore(as, ir); break; |
3470 | case IR_FSTORE: asm_fstore(as, ir); break; | 3475 | case IR_FSTORE: case IR_XSTORE: asm_fxstore(as, ir); break; |
3471 | 3476 | ||
3472 | /* Allocations. */ | 3477 | /* Allocations. */ |
3473 | case IR_SNEW: asm_snew(as, ir); break; | 3478 | case IR_SNEW: asm_snew(as, ir); break; |