aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2004-03-07 11:00:30 +0100
committerStephane Carrez <ciceron@gcc.gnu.org>2004-03-07 11:00:30 +0100
commita75ea627dde8af5b318341d3d2e37b70062f2737 (patch)
treedd50c116b1a367e9af99451afd2bbfc84beb6dff /gcc
parent7179b6dbfef5c4cf3ef9bb5e21bbb43bae757aa5 (diff)
downloadgcc-a75ea627dde8af5b318341d3d2e37b70062f2737.zip
gcc-a75ea627dde8af5b318341d3d2e37b70062f2737.tar.gz
gcc-a75ea627dde8af5b318341d3d2e37b70062f2737.tar.bz2
m68hc11.c (m68hc11_gen_movhi): Use 2,-sp to push the stack register.
* config/m68hc11/m68hc11.c (m68hc11_gen_movhi): Use 2,-sp to push the stack register. (expand_prologue): Don't make an interrupt or a trap handler a far symbol. (m68hc11_initial_elimination_offset): Likewise. From-SVN: r79058
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/m68hc11/m68hc11.c14
2 files changed, 18 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8455840..4509825 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2004-03-06 Stephane Carrez <stcarrez@nerim.fr>
+
+ * config/m68hc11/m68hc11.c (m68hc11_gen_movhi): Use 2,-sp to push
+ the stack register.
+ (expand_prologue): Don't make an interrupt or a trap handler a far
+ symbol.
+ (m68hc11_initial_elimination_offset): Likewise.
+
2004-03-06 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.c (alpha_in_small_data_p): False for functions.
diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c
index cca40ed..9fb9060 100644
--- a/gcc/config/m68hc11/m68hc11.c
+++ b/gcc/config/m68hc11/m68hc11.c
@@ -1402,15 +1402,19 @@ m68hc11_initial_elimination_offset (int from, int to)
/* For a trap handler, we must take into account the registers which
are pushed on the stack during the trap (except the PC). */
func_attr = TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl));
+ current_function_interrupt = lookup_attribute ("interrupt",
+ func_attr) != NULL_TREE;
+ trap_handler = lookup_attribute ("trap", func_attr) != NULL_TREE;
if (lookup_attribute ("far", func_attr) != 0)
current_function_far = 1;
else if (lookup_attribute ("near", func_attr) != 0)
current_function_far = 0;
else
- current_function_far = TARGET_LONG_CALLS != 0;
+ current_function_far = (TARGET_LONG_CALLS != 0
+ && !current_function_interrupt
+ && !trap_handler);
- trap_handler = lookup_attribute ("trap", func_attr) != NULL_TREE;
if (trap_handler && from == ARG_POINTER_REGNUM)
size = 7;
@@ -1690,7 +1694,9 @@ expand_prologue (void)
else if (lookup_attribute ("near", func_attr) != NULL_TREE)
current_function_far = 0;
else
- current_function_far = TARGET_LONG_CALLS != 0;
+ current_function_far = (TARGET_LONG_CALLS != 0
+ && !current_function_interrupt
+ && !current_function_trap);
/* Get the scratch register to build the frame and push registers.
If the first argument is a 32-bit quantity, the D+X registers
@@ -3235,7 +3241,7 @@ m68hc11_gen_movhi (rtx insn, rtx *operands)
output_asm_insn ("psh%1", operands);
break;
case HARD_SP_REGNUM:
- output_asm_insn ("sts\t-2,sp", operands);
+ output_asm_insn ("sts\t2,-sp", operands);
break;
default:
abort ();