diff options
author | Stephane Carrez <Stephane.Carrez@worldnet.fr> | 2001-09-30 14:51:17 +0200 |
---|---|---|
committer | Stephane Carrez <ciceron@gcc.gnu.org> | 2001-09-30 14:51:17 +0200 |
commit | 713b2058151af2403186126a0e60cf80ed3425c4 (patch) | |
tree | 20c51d04b490154e4399d31e489ae528b589f4aa | |
parent | b5b4c48cf6644c188299190ff580f08ecd49ff0e (diff) | |
download | gcc-713b2058151af2403186126a0e60cf80ed3425c4.zip gcc-713b2058151af2403186126a0e60cf80ed3425c4.tar.gz gcc-713b2058151af2403186126a0e60cf80ed3425c4.tar.bz2 |
m68hc11.c (m68hc11_gen_movhi): Fix move of sp to tmp reg.
* config/m68hc11/m68hc11.c (m68hc11_gen_movhi): Fix move of sp
to tmp reg.
From-SVN: r45903
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/m68hc11/m68hc11.c | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 60822bd..9d4f389 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2001-09-30 Stephane Carrez <Stephane.Carrez@worldnet.fr> + * config/m68hc11/m68hc11.c (m68hc11_gen_movhi): Fix move of sp + to tmp reg. + +2001-09-30 Stephane Carrez <Stephane.Carrez@worldnet.fr> + * config/m68hc11/m68hc11.h(INCOMING_RETURN_ADDR_RTX): Remove so that we use setjmp/longjmp exceptions. diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c index da45de0..494de47 100644 --- a/gcc/config/m68hc11/m68hc11.c +++ b/gcc/config/m68hc11/m68hc11.c @@ -3299,7 +3299,17 @@ m68hc11_gen_movhi (insn, operands) if (ix_reg == 0) create_regs_rtx (); - if (reg_mentioned_p (ix_reg, operands[0])) + if (REG_P (operands[0]) && REGNO (operands[0]) == SOFT_TMP_REGNUM) + { + output_asm_insn ("pshx", operands); + output_asm_insn ("tsx", operands); + output_asm_insn ("inx", operands); + output_asm_insn ("inx", operands); + output_asm_insn ("stx\t%0", operands); + output_asm_insn ("pulx", operands); + } + + else if (reg_mentioned_p (ix_reg, operands[0])) { output_asm_insn ("sty\t%t0", operands); output_asm_insn ("tsy", operands); |