r6 int volatile;
r5 int volatile;
r4 int volatile;
- r3 int volatile ret;
+ r3 int volatile iret;
r31 int;
r30 int;
emit "addi sp, sp, 8"
cost 8;
- SETRET.I(in:(ret)reg)
+ SETRET.I(in:(iret)reg)
emit "! setret4"
cost 1;
emit "li32 %out.1, 0"
cost 8;
- out:(ret)reg = FROMF.I(in:(dret)reg)
+ out:(iret)reg = FROMF.I(in:(dret)reg)
with corrupted(volatile)
emit "bl .fromf2i"
cost 4;
- out:(ret)reg = FROMD.I(in:(dret)reg)
+ out:(iret)reg = FROMD.I(in:(dret)reg)
with corrupted(volatile)
emit "bl .fromd2i"
cost 4;
emit "bl .fromf2l"
cost 4;
- out:(dret)reg = FROMSI.D(in:(ret)reg)
+ out:(dret)reg = FROMSI.D(in:(iret)reg)
with corrupted(volatile)
emit "bl .fromsi2d"
cost 4;
- out:(fret)reg = FROMUI.F(in:(ret)reg)
+ out:(fret)reg = FROMUI.F(in:(iret)reg)
with corrupted(volatile)
emit "bl .fromui2f"
cost 4;
- out:(dret)reg = FROMUI.D(in:(ret)reg)
+ out:(dret)reg = FROMUI.D(in:(iret)reg)
with corrupted(volatile)
emit "bl .fromui2d"
cost 4;
cost 4;
CALLLABEL(CALL)
- out:(int)reg = CALLLABEL(CALL.I)
- out:(long)reg = CALLLABEL(CALL.L)
+ out:(iret)reg = CALLLABEL(CALL.I)
+ out:(lret)reg = CALLLABEL(CALL.L)
#define CALLINDIRECT(insn) \
insn (dest:(int)reg) \
cost 8;
CALLINDIRECT(CALL)
- out:(int)reg = CALLINDIRECT(CALL.I)
- out:(long)reg = CALLINDIRECT(CALL.L)
+ out:(iret)reg = CALLINDIRECT(CALL.I)
+ out:(lret)reg = CALLINDIRECT(CALL.L)
JUMP(dest:LABEL.I)
emit "b $dest"
static bool allocatable_stackable_output(struct hreg* hreg, struct vreg* vreg)
{
return !register_used(current_outs, hreg) &&
- (hreg->attrs & vreg->type) &&
- !(hreg->attrs & current_hop->insndata->corrupts);
+ (hreg->attrs & vreg->type);
}
static bool allocatable_input(struct hreg* hreg, struct vreg* vreg)
static bool allocatable_through(struct hreg* hreg, struct vreg* vreg)
{
return allocatable_stackable_input(hreg, vreg) &&
- allocatable_stackable_output(hreg, vreg);
+ allocatable_stackable_output(hreg, vreg) &&
+ !(hreg->attrs & current_hop->insndata->corrupts);
}
static struct hreg* find_input_reg(struct vreg* vreg)
{
hreg = hregs.item[i];
if (allocatable_output(hreg, vreg))
- {
return hreg;
- }
}
return NULL;