Commit 69f6e760 by Michael Hayes Committed by Michael Hayes

c4x.c (c4x_expand_prologue): Don't compile an ISR with more than 32767 words of local storage.

	* config/c4x/c4x.c (c4x_expand_prologue): Don't compile an ISR
	with more than 32767 words of local storage.

From-SVN: r38703
parent 06dd70c6
2001-01-05 Michael Hayes <m.hayes@elec.canterbury.ac.nz> 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 * config/c4x/c4x.c (c4x_init_builtins): Remove builtin support
for 'abs', 'labs', and 'fabs'. for 'abs', 'labs', and 'fabs'.
(c4x_expand_builtin): Likewise. (c4x_expand_builtin): Likewise.
......
...@@ -826,10 +826,15 @@ c4x_expand_prologue () ...@@ -826,10 +826,15 @@ c4x_expand_prologue ()
insn = emit_insn (gen_movqi (gen_rtx_REG (QImode, AR3_REGNO), insn = emit_insn (gen_movqi (gen_rtx_REG (QImode, AR3_REGNO),
gen_rtx_REG (QImode, SP_REGNO))); gen_rtx_REG (QImode, SP_REGNO)));
RTX_FRAME_RELATED_P (insn) = 1; RTX_FRAME_RELATED_P (insn) = 1;
/* FIXME: Assume ISR doesn't require more than 32767 words /* We require that an ISR uses fewer than 32768 words of
of local variables. */ 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) 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); current_function_name, size);
insn = emit_insn (gen_addqi3 (gen_rtx_REG (QImode, SP_REGNO), insn = emit_insn (gen_addqi3 (gen_rtx_REG (QImode, SP_REGNO),
gen_rtx_REG (QImode, SP_REGNO), gen_rtx_REG (QImode, SP_REGNO),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment