This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH]: Fix clobber in lshrdi3_const32 (HC11/HC12)
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH]: Fix clobber in lshrdi3_const32 (HC11/HC12)
- From: Stephane Carrez <Stephane dot Carrez at worldnet dot fr>
- Date: Tue, 12 Jun 2001 00:16:33 +0200
Hi!
The 'lshrdi3_const32' pattern uses a clobber that must not occur in one
of the operands. It happened that reload uses the same address register
for a memory operand and for the clobber. It's necessary to mark the clobber
as an early clobber to prevent that. {problem happened in generation of muldf3
of dp-bit.c}.
I've integrated this patch on 3_0 and mainline.
Stephane
2001-06-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* config/m68hc11/m68hc11.md ("*lshrdi3_const32"): Mark the clobber
as an early clobber to make sure it is not used by reload in
one of the operands.
Index: config/m68hc11/m68hc11.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/m68hc11/m68hc11.md,v
retrieving revision 1.3.4.10
diff -u -p -r1.3.4.10 m68hc11.md
--- m68hc11.md 2001/06/10 17:02:38 1.3.4.10
+++ m68hc11.md 2001/06/11 22:00:42
@@ -3918,7 +3918,7 @@
[(set (match_operand:DI 0 "nonimmediate_operand" "=<,um")
(ashift:DI (match_operand:DI 1 "general_operand" "umi,umi")
(const_int 32)))
- (clobber (match_scratch:HI 2 "=A,d"))]
+ (clobber (match_scratch:HI 2 "=&A,d"))]
"reload_completed"
[(const_int 0)]
"/* Move the lowpart in the highpart first in case the shift
@@ -4689,7 +4689,7 @@
[(set (match_operand:DI 0 "nonimmediate_operand" "=<,m,u")
(lshiftrt:DI (match_operand:DI 1 "general_operand" "umi,umi,umi")
(const_int 32)))
- (clobber (match_scratch:HI 2 "=A,d,d"))]
+ (clobber (match_scratch:HI 2 "=&A,d,d"))]
""
"#")
@@ -4697,7 +4697,7 @@
[(set (match_operand:DI 0 "nonimmediate_operand" "=<,um")
(lshiftrt:DI (match_operand:DI 1 "general_operand" "umi,umi")
(const_int 32)))
- (clobber (match_scratch:HI 2 "=A,d"))]
+ (clobber (match_scratch:HI 2 "=&A,d"))]
"reload_completed"
[(const_int 0)]
"m68hc11_split_move (m68hc11_gen_lowpart (SImode, operands[0]),