This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Add earlyclobbers for stack_protector_test* (PR target/22262)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 30 Jun 2005 19:18:58 -0400
- Subject: [PATCH] Add earlyclobbers for stack_protector_test* (PR target/22262)
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
scratch %3 on i386 is loaded before memory operand %2 is used,
so earlyclobber is needed. On rs6000 similarly, but %4 does not
need the earlyclobber on the other side.
Ok to commit if bootstrap/regtesting succeeds?
2005-07-01 Jakub Jelinek <jakub@redhat.com>
PR target/22262
* config/i386/i386.md (stack_protect_test_si,
stack_protect_test_di): Add earlyclobber for scratch 3.
* config/rs6000/rs6000.md (stack_protect_testsi,
stack_protect_testdi): Add earlyclobber for scratch 3,
remove earlyclobber from scratch 4.
--- gcc/config/i386/i386.md.jj 2005-06-30 16:26:56.000000000 +0200
+++ gcc/config/i386/i386.md 2005-07-01 01:08:47.000000000 +0200
@@ -19662,7 +19662,7 @@
(unspec:CCZ [(match_operand:SI 1 "memory_operand" "m")
(match_operand:SI 2 "memory_operand" "m")]
UNSPEC_SP_TEST))
- (clobber (match_scratch:SI 3 "=r"))]
+ (clobber (match_scratch:SI 3 "=&r"))]
""
"mov{l}\t{%1, %3|%3, %1}\;xor{l}\t{%2, %3|%3, %2}"
[(set_attr "type" "multi")])
@@ -19672,7 +19672,7 @@
(unspec:CCZ [(match_operand:DI 1 "memory_operand" "m")
(match_operand:DI 2 "memory_operand" "m")]
UNSPEC_SP_TEST))
- (clobber (match_scratch:DI 3 "=r"))]
+ (clobber (match_scratch:DI 3 "=&r"))]
"TARGET_64BIT"
"mov{q}\t{%1, %3|%3, %1}\;xor{q}\t{%2, %3|%3, %2}"
[(set_attr "type" "multi")])
--- gcc/config/rs6000/rs6000.md.jj 2005-06-30 16:26:56.000000000 +0200
+++ gcc/config/rs6000/rs6000.md 2005-07-01 01:14:56.000000000 +0200
@@ -10808,8 +10808,8 @@
(unspec:CCEQ [(match_operand:SI 1 "memory_operand" "m,m")
(match_operand:SI 2 "memory_operand" "m,m")]
UNSPEC_SP_TEST))
- (clobber (match_scratch:SI 3 "=r,r"))
- (set (match_scratch:SI 4 "=&r,&r") (const_int 0))]
+ (clobber (match_scratch:SI 3 "=&r,&r"))
+ (set (match_scratch:SI 4 "=r,r") (const_int 0))]
"TARGET_32BIT"
"@
{l%U1%X1|lwz%U1%X1} %3,%1\;{l%U2%X2|lwz%U2%X2} %4,%2\;xor. %3,%3,%4\;{lil|li} %4,0
@@ -10821,8 +10821,8 @@
(unspec:CCEQ [(match_operand:DI 1 "memory_operand" "m,m")
(match_operand:DI 2 "memory_operand" "m,m")]
UNSPEC_SP_TEST))
- (clobber (match_scratch:DI 3 "=r,r"))
- (set (match_scratch:DI 4 "=&r,&r") (const_int 0))]
+ (clobber (match_scratch:DI 3 "=&r,&r"))
+ (set (match_scratch:DI 4 "=r,r") (const_int 0))]
"TARGET_64BIT"
"@
ld%U1%X1 %3,%1\;ld%U2%X2 %4,%2\;xor. %3,%3,%4\;{lil|li} %4,0
Jakub