Commit a06f01ba by James E Wilson Committed by Jim Wilson

Patch for asm clobber of fp.

* flow.c (mark_set_regs, case PARALLEL): Scan loop forwards.
Add case for ASM_OPERANDS.
* global.c (global_alloc): Set regs_ever_live for regs_asm_clobbered
registers.

From-SVN: r74869
parent 020036b9
2003-12-19 James E Wilson <wilson@specifixinc.com>
* flow.c (mark_set_regs, case PARALLEL): Scan loop forwards.
Add case for ASM_OPERANDS.
* global.c (global_alloc): Set regs_ever_live for regs_asm_clobbered
registers.
2003-12-19 Kazu Hirata <kazu@cs.umass.edu>
* expr.c (check_max_integer_computation_mode): Remove.
......
......@@ -2468,7 +2468,9 @@ mark_set_regs (struct propagate_block_info *pbi, rtx x, rtx insn)
{
int i;
for (i = XVECLEN (x, 0) - 1; i >= 0; i--)
/* We must scan forwards. If we have an asm, we need to set
the PROP_ASM_SCAN flag before scanning the clobbers. */
for (i = 0; i < XVECLEN (x, 0); i++)
{
rtx sub = XVECEXP (x, 0, i);
switch (code = GET_CODE (sub))
......@@ -2495,6 +2497,10 @@ mark_set_regs (struct propagate_block_info *pbi, rtx x, rtx insn)
mark_set_1 (pbi, code, SET_DEST (sub), cond, insn, flags);
break;
case ASM_OPERANDS:
flags |= PROP_ASM_SCAN;
break;
default:
break;
}
......
......@@ -355,6 +355,8 @@ global_alloc (FILE *file)
else if (cannot_elim)
error ("%s cannot be used in asm here",
reg_names[eliminables[i].from]);
else
regs_ever_live[eliminables[i].from] = 1;
}
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
if (!regs_asm_clobbered[HARD_FRAME_POINTER_REGNUM])
......@@ -366,6 +368,8 @@ global_alloc (FILE *file)
else if (need_fp)
error ("%s cannot be used in asm here",
reg_names[HARD_FRAME_POINTER_REGNUM]);
else
regs_ever_live[HARD_FRAME_POINTER_REGNUM] = 1;
#endif
#else
......@@ -377,6 +381,8 @@ global_alloc (FILE *file)
}
else if (need_fp)
error ("%s cannot be used in asm here", reg_names[FRAME_POINTER_REGNUM]);
else
regs_ever_live[FRAME_POINTER_REGNUM] = 1;
#endif
/* Track which registers have already been used. Start with registers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment