mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Don't allocate unused 2nd result register in JIT compiler backend.
This commit is contained in:
parent
3d4c9f9639
commit
a443889677
@ -426,7 +426,7 @@ static void asm_gencall(ASMState *as, const CCallInfo *ci, IRRef *args)
|
|||||||
static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci)
|
static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci)
|
||||||
{
|
{
|
||||||
RegSet drop = RSET_SCRATCH;
|
RegSet drop = RSET_SCRATCH;
|
||||||
int hiop = ((ir+1)->o == IR_HIOP);
|
int hiop = ((ir+1)->o == IR_HIOP && !irt_isnil((ir+1)->t));
|
||||||
if (ra_hasreg(ir->r))
|
if (ra_hasreg(ir->r))
|
||||||
rset_clear(drop, ir->r); /* Dest reg handled below. */
|
rset_clear(drop, ir->r); /* Dest reg handled below. */
|
||||||
if (hiop && ra_hasreg((ir+1)->r))
|
if (hiop && ra_hasreg((ir+1)->r))
|
||||||
|
@ -291,7 +291,7 @@ static void asm_gencall(ASMState *as, const CCallInfo *ci, IRRef *args)
|
|||||||
static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci)
|
static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci)
|
||||||
{
|
{
|
||||||
RegSet drop = RSET_SCRATCH;
|
RegSet drop = RSET_SCRATCH;
|
||||||
int hiop = ((ir+1)->o == IR_HIOP);
|
int hiop = ((ir+1)->o == IR_HIOP && !irt_isnil((ir+1)->t));
|
||||||
if ((ci->flags & CCI_NOFPRCLOBBER))
|
if ((ci->flags & CCI_NOFPRCLOBBER))
|
||||||
drop &= ~RSET_FPR;
|
drop &= ~RSET_FPR;
|
||||||
if (ra_hasreg(ir->r))
|
if (ra_hasreg(ir->r))
|
||||||
|
@ -298,7 +298,7 @@ static void asm_gencall(ASMState *as, const CCallInfo *ci, IRRef *args)
|
|||||||
static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci)
|
static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci)
|
||||||
{
|
{
|
||||||
RegSet drop = RSET_SCRATCH;
|
RegSet drop = RSET_SCRATCH;
|
||||||
int hiop = ((ir+1)->o == IR_HIOP);
|
int hiop = ((ir+1)->o == IR_HIOP && !irt_isnil((ir+1)->t));
|
||||||
if ((ci->flags & CCI_NOFPRCLOBBER))
|
if ((ci->flags & CCI_NOFPRCLOBBER))
|
||||||
drop &= ~RSET_FPR;
|
drop &= ~RSET_FPR;
|
||||||
if (ra_hasreg(ir->r))
|
if (ra_hasreg(ir->r))
|
||||||
|
@ -531,7 +531,7 @@ static void asm_gencall(ASMState *as, const CCallInfo *ci, IRRef *args)
|
|||||||
static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci)
|
static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci)
|
||||||
{
|
{
|
||||||
RegSet drop = RSET_SCRATCH;
|
RegSet drop = RSET_SCRATCH;
|
||||||
int hiop = (LJ_32 && (ir+1)->o == IR_HIOP);
|
int hiop = (LJ_32 && (ir+1)->o == IR_HIOP && !irt_isnil((ir+1)->t));
|
||||||
if ((ci->flags & CCI_NOFPRCLOBBER))
|
if ((ci->flags & CCI_NOFPRCLOBBER))
|
||||||
drop &= ~RSET_FPR;
|
drop &= ~RSET_FPR;
|
||||||
if (ra_hasreg(ir->r))
|
if (ra_hasreg(ir->r))
|
||||||
|
Loading…
Reference in New Issue
Block a user