diff options
Diffstat (limited to 'src/lj_asm_x86.h')
-rw-r--r-- | src/lj_asm_x86.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h index da4cf7e2..7288d72a 100644 --- a/src/lj_asm_x86.h +++ b/src/lj_asm_x86.h | |||
@@ -510,10 +510,13 @@ static void asm_gencall(ASMState *as, const CCallInfo *ci, IRRef *args) | |||
510 | static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci) | 510 | static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci) |
511 | { | 511 | { |
512 | RegSet drop = RSET_SCRATCH; | 512 | RegSet drop = RSET_SCRATCH; |
513 | int hiop = (LJ_32 && (ir+1)->o == IR_HIOP); | ||
513 | if ((ci->flags & CCI_NOFPRCLOBBER)) | 514 | if ((ci->flags & CCI_NOFPRCLOBBER)) |
514 | drop &= ~RSET_FPR; | 515 | drop &= ~RSET_FPR; |
515 | if (ra_hasreg(ir->r)) | 516 | if (ra_hasreg(ir->r)) |
516 | rset_clear(drop, ir->r); /* Dest reg handled below. */ | 517 | rset_clear(drop, ir->r); /* Dest reg handled below. */ |
518 | if (hiop && ra_hasreg((ir+1)->r)) | ||
519 | rset_clear(drop, (ir+1)->r); /* Dest reg handled below. */ | ||
517 | ra_evictset(as, drop); /* Evictions must be performed first. */ | 520 | ra_evictset(as, drop); /* Evictions must be performed first. */ |
518 | if (ra_used(ir)) { | 521 | if (ra_used(ir)) { |
519 | if (irt_isfp(ir->t)) { | 522 | if (irt_isfp(ir->t)) { |
@@ -547,6 +550,8 @@ static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci) | |||
547 | irt_isnum(ir->t) ? XOg_FSTPq : XOg_FSTPd, RID_ESP, ofs); | 550 | irt_isnum(ir->t) ? XOg_FSTPq : XOg_FSTPd, RID_ESP, ofs); |
548 | } | 551 | } |
549 | #endif | 552 | #endif |
553 | } else if (hiop) { | ||
554 | ra_destpair(as, ir); | ||
550 | } else { | 555 | } else { |
551 | lua_assert(!irt_ispri(ir->t)); | 556 | lua_assert(!irt_ispri(ir->t)); |
552 | ra_destreg(as, ir, RID_RET); | 557 | ra_destreg(as, ir, RID_RET); |
@@ -2288,9 +2293,8 @@ static void asm_hiop(ASMState *as, IRIns *ir) | |||
2288 | } | 2293 | } |
2289 | case IR_CALLN: | 2294 | case IR_CALLN: |
2290 | case IR_CALLXS: | 2295 | case IR_CALLXS: |
2291 | ra_destreg(as, ir, RID_RETHI); | ||
2292 | if (!uselo) | 2296 | if (!uselo) |
2293 | ra_allocref(as, ir->op1, RID2RSET(RID_RETLO)); /* Mark call as used. */ | 2297 | ra_allocref(as, ir->op1, RID2RSET(RID_RETLO)); /* Mark lo op as used. */ |
2294 | break; | 2298 | break; |
2295 | case IR_CNEWI: | 2299 | case IR_CNEWI: |
2296 | /* Nothing to do here. Handled by CNEWI itself. */ | 2300 | /* Nothing to do here. Handled by CNEWI itself. */ |