aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorStephane Carrez <Stephane.Carrez@worldnet.fr>2001-07-05 23:17:10 +0200
committerStephane Carrez <ciceron@gcc.gnu.org>2001-07-05 23:17:10 +0200
commit43a727554dae9550dbd823af097964fef4aaa265 (patch)
tree50f37a4df9830a88761aa121b1976bfa088092ad /gcc
parent35f0a736aebf61d40512c4aaeded94d658b8e792 (diff)
downloadgcc-43a727554dae9550dbd823af097964fef4aaa265.zip
gcc-43a727554dae9550dbd823af097964fef4aaa265.tar.gz
gcc-43a727554dae9550dbd823af097964fef4aaa265.tar.bz2
m68hc11.md ("*ashlsi3"): Operand 1 can be a memory reference using the stack pointer...
* config/m68hc11/m68hc11.md ("*ashlsi3"): Operand 1 can be a memory reference using the stack pointer, adjust it since we push Y temporarily. ("*ashrsi3"): Likewise. ("*lshrsi3"): Likewise. From-SVN: r43791
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/m68hc11/m68hc11.md27
2 files changed, 32 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cd99757..03e9a4c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2001-07-04 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * config/m68hc11/m68hc11.md ("*ashlsi3"): Operand 1 can be a memory
+ reference using the stack pointer, adjust it since we push Y
+ temporarily.
+ ("*ashrsi3"): Likewise.
+ ("*lshrsi3"): Likewise.
+
2001-07-05 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* config/m68hc11/m68hc11.h (RETURN_ADDR_RTX): Fix return address
diff --git a/gcc/config/m68hc11/m68hc11.md b/gcc/config/m68hc11/m68hc11.md
index b7b8fe3..f599204 100644
--- a/gcc/config/m68hc11/m68hc11.md
+++ b/gcc/config/m68hc11/m68hc11.md
@@ -4190,8 +4190,15 @@
is true for 68hc11 only, we save temporary the value of Y. */
if (!Y_REG_P (operands[2]))
{
+ rtx ops[1];
+
+ ops[0] = operands[1];
output_asm_insn (\"pshy\", operands);
- output_asm_insn (\"ldy\\t%1\", operands);
+ if (reg_mentioned_p (stack_pointer_rtx, operands[1]))
+ {
+ ops[0] = adjust_address (operands[1], GET_MODE (operands[1]), 2);
+ }
+ output_asm_insn (\"ldy\\t%0\", ops);
output_asm_insn (\"bsr\\t___ashlsi3\", operands);
return \"puly\";
}
@@ -4591,8 +4598,15 @@
is true for 68hc11 only, we save temporary the value of Y. */
if (!Y_REG_P (operands[2]))
{
+ rtx ops[1];
+
+ ops[0] = operands[1];
output_asm_insn (\"pshy\", operands);
- output_asm_insn (\"ldy\\t%1\", operands);
+ if (reg_mentioned_p (stack_pointer_rtx, operands[1]))
+ {
+ ops[0] = adjust_address (operands[1], GET_MODE (operands[1]), 2);
+ }
+ output_asm_insn (\"ldy\\t%0\", ops);
output_asm_insn (\"bsr\\t___ashrsi3\", operands);
return \"puly\";
}
@@ -4928,8 +4942,15 @@
is true for 68hc11 only, we save temporary the value of Y. */
if (!Y_REG_P (operands[2]))
{
+ rtx ops[1];
+
+ ops[0] = operands[1];
output_asm_insn (\"pshy\", operands);
- output_asm_insn (\"ldy\\t%1\", operands);
+ if (reg_mentioned_p (stack_pointer_rtx, operands[1]))
+ {
+ ops[0] = adjust_address (operands[1], GET_MODE (operands[1]), 2);
+ }
+ output_asm_insn (\"ldy\\t%0\", ops);
output_asm_insn (\"bsr\\t___lshrsi3\", operands);
return \"puly\";
}