This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[m68k 06/13] prevent a byte push on the stack
- From: zippel at linux-m68k dot org
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Jan 2007 12:26:21 +0100
- Subject: [m68k 06/13] prevent a byte push on the stack
- References: <20070130112615.782382000@linux-m68k.org>
Hi,
combine sometimes tries to generate a byte push on the stack, which
isn't valid on m68k and will fail later in output_move_qimode(), so we
have to prevent this.
2007-01-30 Roman Zippel <zippel@linux-m68k.org>
* config/m68k/m68k.md: prevent generation of byte push on the stack
---
gcc/config/m68k/m68k.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: gcc-4.1/gcc/config/m68k/m68k.md
===================================================================
--- gcc-4.1.orig/gcc/config/m68k/m68k.md
+++ gcc-4.1/gcc/config/m68k/m68k.md
@@ -748,7 +748,10 @@
(define_insn ""
[(set (match_operand:QI 0 "nonimmediate_operand" "=d,*a,m")
(match_operand:QI 1 "general_src_operand" "dmSi*a,di*a,dmSi"))]
- "!TARGET_COLDFIRE"
+ "!TARGET_COLDFIRE
+ && (!MEM_P (operands[0])
+ || GET_CODE (XEXP (operands[0], 0)) != PRE_DEC
+ || XEXP (XEXP (operands[0], 0), 0) != stack_pointer_rtx)"
"* return output_move_qimode (operands);")
(define_insn ""
--