summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorm.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-05 04:09:02 +0000
committerm.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-05 04:09:02 +0000
commitc85601868d9ef12d39a8dbd8d57735af592a7293 (patch)
treedf5ec5d0fffb94a39b2304b56fa43f334259b69a
parentec5a6a405257c944c2e3e85525dd4ec222a04a55 (diff)
downloadgcc-c85601868d9ef12d39a8dbd8d57735af592a7293.tar.gz
* config/c4x/c4x.c (c4x_expand_prologue): Don't compile an ISR
with more than 32767 words of local storage. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38703 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/c4x/c4x.c11
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a710137906b..fd4905ae632 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
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
for 'abs', 'labs', and 'fabs'.
(c4x_expand_builtin): Likewise.
diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c
index 230b54cf0d2..496da47ada2 100644
--- a/gcc/config/c4x/c4x.c
+++ b/gcc/config/c4x/c4x.c
@@ -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),