This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, m68k, PR42516] Improve swap on ColdFire
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Maxim Kuvyrkov <maxim at codesourcery dot com>
- Cc: Andreas Schwab <schwab at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, nizze86 at hotmail dot com
- Date: Sun, 27 Dec 2009 21:49:32 +0100
- Subject: Re: [PATCH, m68k, PR42516] Improve swap on ColdFire
- References: <4B37BD80.2070602@codesourcery.com>
Maxim Kuvyrkov <maxim@codesourcery.com> writes:
> The problem is in rotlsi3 instruction patter which is disabled for
> ColdFire. This patch adds rotlsi3 expander and splits the constraints
> into alternatives in the original pattern. Then it enables one of the
> alternatives for ColdFire.
I think this simpler patch works just as well.
Index: m68k.md
===================================================================
--- m68k.md (revision 155479)
+++ m68k.md (working copy)
@@ -5368,6 +5368,14 @@
;; rotate instructions
+(define_insn "rotlsi_16"
+ [(set (match_operand:SI 0 "register_operand" "=d")
+ (rotate:SI (match_operand:SI 1 "register_operand" "0")
+ (const_int 16)))]
+ ""
+ "swap %0"
+ [(set_attr "type" "shift")])
+
(define_insn "rotlsi3"
[(set (match_operand:SI 0 "register_operand" "=d")
(rotate:SI (match_operand:SI 1 "register_operand" "0")
> While I was at it, I also improved scheduling descriptions for shift
> instructions.
Don't lump together unrelated changes.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."