aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-12-30 07:28:37 +0000
committerRichard Stallman <rms@gnu.org>1992-12-30 07:28:37 +0000
commit5488078fdc7570059875dda453fae8da8c802aa7 (patch)
tree5a371eb2ec27cda72f3c0b35bdfb8c8046f74fee /gcc
parent2e4cd151b808bc8d75cbcc499a8b6bd949806aa0 (diff)
downloadgcc-5488078fdc7570059875dda453fae8da8c802aa7.zip
gcc-5488078fdc7570059875dda453fae8da8c802aa7.tar.gz
gcc-5488078fdc7570059875dda453fae8da8c802aa7.tar.bz2
(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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/reload.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index f9b0a0c..7757dd7 100644
--- a/gcc/reload.c
+++ b/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.