aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@cygnus.co.uk>1999-12-19 17:39:15 +0000
committerBernd Schmidt <crux@gcc.gnu.org>1999-12-19 17:39:15 +0000
commitecf3151a7b05ef0ce14104406aa3d98a2c0601ed (patch)
treed299043f0d54e22d44788992f50830381f45d915 /gcc/reload1.c
parent7cfc1daaf80e61348668c0a2e97399993dd7d8bd (diff)
downloadgcc-ecf3151a7b05ef0ce14104406aa3d98a2c0601ed.zip
gcc-ecf3151a7b05ef0ce14104406aa3d98a2c0601ed.tar.gz
gcc-ecf3151a7b05ef0ce14104406aa3d98a2c0601ed.tar.bz2
Better spill failure messages.
From-SVN: r31026
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index dc69085..2a6f9cc 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -375,7 +375,7 @@ static void find_reload_regs PROTO((struct insn_chain *, FILE *));
static void select_reload_regs PROTO((FILE *));
static void delete_caller_save_insns PROTO((void));
-static void spill_failure PROTO((rtx));
+static void spill_failure PROTO((rtx, enum reg_class));
static void count_spilled_pseudo PROTO((int, int, int));
static void delete_dead_insn PROTO((rtx));
static void alter_reg PROTO((int, int));
@@ -1720,7 +1720,7 @@ find_reload_regs (chain, dumpfile)
&& rld[r].regno == -1)
if (! find_reg (chain, i, dumpfile))
{
- spill_failure (chain->insn);
+ spill_failure (chain->insn, rld[r].class);
failure = 1;
return;
}
@@ -1787,13 +1787,20 @@ delete_caller_save_insns ()
INSN should be one of the insns which needed this particular spill reg. */
static void
-spill_failure (insn)
+spill_failure (insn, class)
rtx insn;
+ enum reg_class class;
{
+ static const char *const reg_class_names[] = REG_CLASS_NAMES;
if (asm_noperands (PATTERN (insn)) >= 0)
- error_for_asm (insn, "`asm' needs too many reloads");
+ error_for_asm (insn, "Can't find a register in class `%s' while reloading `asm'.",
+ reg_class_names[class]);
else
- fatal_insn ("Unable to find a register to spill.", insn);
+ {
+ error ("Unable to find a register to spill in class `%s'.",
+ reg_class_names[class]);
+ fatal_insn ("This is the insn:", insn);
+ }
}
/* Delete an unneeded INSN and any previous insns who sole purpose is loading