c4x.c (c4x_expand_prologue): Don't compile an ISR with more than 32767 words of local...
authorMichael Hayes <m.hayes@elec.canterbury.ac.nz>
Fri, 5 Jan 2001 04:09:02 +0000 (04:09 +0000)
committerMichael Hayes <m.hayes@gcc.gnu.org>
Fri, 5 Jan 2001 04:09:02 +0000 (04:09 +0000)
* config/c4x/c4x.c (c4x_expand_prologue): Don't compile an ISR
with more than 32767 words of local storage.

From-SVN: r38703

gcc/ChangeLog
gcc/config/c4x/c4x.c

index a710137906ba9c6a5b35eb6951e14c2a7965a639..fd4905ae632d32a916530f9021ab6f7d4bf8b1f2 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-05  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
+
+       * config/c4x/c4x.c (c4x_expand_prologue): Don't compile an ISR
+       with more than 32767 words of local storage.
+
 2001-01-05  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
 
        * config/c4x/c4x.c (c4x_init_builtins): Remove builtin support
index 230b54cf0d2c49df265681f7a110e1873b04e5e4..496da47ada2038d726b8f2e83c59d779534f7c10 100644 (file)
@@ -826,10 +826,15 @@ c4x_expand_prologue ()
          insn = emit_insn (gen_movqi (gen_rtx_REG (QImode, AR3_REGNO),
                                       gen_rtx_REG (QImode, SP_REGNO)));
           RTX_FRAME_RELATED_P (insn) = 1;
-         /* FIXME: Assume ISR doesn't require more than 32767 words
-            of local variables.  */
+         /* We require that an ISR uses fewer than 32768 words of
+            local variables, otherwise we have to go to lots of
+            effort to save a register, load it with the desired size,
+            adjust the stack pointer, and then restore the modified
+            register.  Frankly, I think it is a poor ISR that
+            requires more than 32767 words of local temporary
+            storage!  */
          if (size > 32767)
-           error ("ISR %s requires %d words of local vars, max is 32767.",
+           fatal ("ISR %s requires %d words of local vars, max is 32767.",
                   current_function_name, size);
          insn = emit_insn (gen_addqi3 (gen_rtx_REG (QImode, SP_REGNO),
                                        gen_rtx_REG (QImode, SP_REGNO),