This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[m68k 06/13] prevent a byte push on the stack


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 ""

--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]