(push_reload): Move the NO_REGS abort after the error check for asms, to avoid crashing for asms.
(push_reload): Move the NO_REGS abort after the error check for asms, to avoid crashing for asms. Fix inmode and outmode too, if they are VOID for an asm. From-SVN: r2989
This commit is contained in:
parent
2e4cd151b8
commit
5488078fdc
15
gcc/reload.c
15
gcc/reload.c
@ -695,9 +695,6 @@ push_reload (in, out, inloc, outloc, class,
|
||||
class = LIMIT_RELOAD_CLASS (GET_MODE (SUBREG_REG (out)), class);
|
||||
#endif
|
||||
|
||||
if (class == NO_REGS)
|
||||
abort ();
|
||||
|
||||
/* Verify that this class is at least possible for the mode that
|
||||
is specified. */
|
||||
if (this_insn_is_asm)
|
||||
@ -707,6 +704,15 @@ push_reload (in, out, inloc, outloc, class,
|
||||
mode = inmode;
|
||||
else
|
||||
mode = outmode;
|
||||
if (mode == VOIDmode)
|
||||
{
|
||||
error_for_asm (this_insn, "cannot reload integer constant operand in `asm'");
|
||||
mode = word_mode;
|
||||
if (in != 0)
|
||||
inmode = word_mode;
|
||||
if (out != 0)
|
||||
outmode = word_mode;
|
||||
}
|
||||
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
||||
if (HARD_REGNO_MODE_OK (i, mode)
|
||||
&& TEST_HARD_REG_BIT (reg_class_contents[(int) class], i))
|
||||
@ -727,6 +733,9 @@ push_reload (in, out, inloc, outloc, class,
|
||||
}
|
||||
}
|
||||
|
||||
if (class == NO_REGS)
|
||||
abort ();
|
||||
|
||||
/* We can use an existing reload if the class is right
|
||||
and at least one of IN and OUT is a match
|
||||
and the other is at worst neutral.
|
||||
|
Loading…
Reference in New Issue
Block a user