Although the coldfire's that I know of are able to use addq/subq to memory
operands, gcc refuses to generate those instructions.

Below is a small patch fixing that.

With it, my coldfire-compiled linux kernel shrinks by 3k IIRC.

Feel free to apply.

Best Regards

Philippe

2005-08-26  Philippe De Muyter  <[EMAIL PROTECTED]>

        * config/m68k/m68k.md (*addsi3_5200): Allow addq/subq to memory
        operands.
        
--- config/m68k/m68k.md 2005-08-25 10:59:51.000000000 +0200
+++ config/m68k/m68k.md 2005-08-26 11:24:33.000000000 +0200
@@ -1861,7 +1887,7 @@
 (define_insn "*addsi3_5200"
   [(set (match_operand:SI 0 "nonimmediate_operand" "=m,?a,?a,r")
        (plus:SI (match_operand:SI 1 "general_operand" "%0,a,rJK,0")
-                (match_operand:SI 2 "general_src_operand" "d,rJK,a,mrIKLi")))]
+                (match_operand:SI 2 "general_src_operand" 
"dIL,rJK,a,mrIKLi")))]
   "TARGET_COLDFIRE"
   "* return output_addsi3 (operands);")
 

Reply via email to