summaryrefslogtreecommitdiff
path: root/gcc/config/m68hc11
diff options
context:
space:
mode:
authorciceron <ciceron@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-05 21:17:10 +0000
committerciceron <ciceron@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-05 21:17:10 +0000
commit2a9237aa1f2a73f449c3087bb9c83534c2bde105 (patch)
tree50f37a4df9830a88761aa121b1976bfa088092ad /gcc/config/m68hc11
parente42b35b9627fac6e82734aae2d1e31eb055ff7e4 (diff)
downloadgcc-2a9237aa1f2a73f449c3087bb9c83534c2bde105.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43791 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m68hc11')
-rw-r--r--gcc/config/m68hc11/m68hc11.md27
1 files changed, 24 insertions, 3 deletions
diff --git a/gcc/config/m68hc11/m68hc11.md b/gcc/config/m68hc11/m68hc11.md
index b7b8fe38d90..f5992049563 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\";
}