This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, i386]: Add FLAGS_REG clobbers to combined bt/jbe patterns
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 08 Oct 2008 17:03:58 +0200
- Subject: [PATCH, i386]: Add FLAGS_REG clobbers to combined bt/jbe patterns
Hello!
bt/jbe combination clobbers FLAGS_REG (carry flag). Attached patch adds
correct clobber to these insn patterns.
2008-10-08 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*jcc_btdi_rex64): Clobber FLAGS_REG.
(*jcc_btdi_mask_rex64): Ditto.
(*jcc_btsi): Ditto.
(*jcc_btsi_mask): Ditto.
(*jcc_btsi_1): Ditto.
(*jcc_btsi_mask_1): Ditto.
Patch was bootstrapped and regression tested on i686-pc-linux-gnu and
x86_64-pc-linux-gnu {, -m32}.
Patch is committed to SVN.
Uros.
Index: i386.md
===================================================================
--- i386.md (revision 140853)
+++ i386.md (working copy)
@@ -14331,7 +14331,8 @@
(match_operand:QI 2 "register_operand" "r")))
(const_int 0)])
(label_ref (match_operand 3 "" ""))
- (pc)))]
+ (pc)))
+ (clobber (reg:CC FLAGS_REG))]
"TARGET_64BIT && (TARGET_USE_BT || optimize_function_for_size_p (cfun))"
"#"
"&& 1"
@@ -14363,7 +14364,8 @@
(match_operand:SI 2 "register_operand" "r")
(match_operand:SI 3 "const_int_operand" "n")))])
(label_ref (match_operand 4 "" ""))
- (pc)))]
+ (pc)))
+ (clobber (reg:CC FLAGS_REG))]
"TARGET_64BIT && (TARGET_USE_BT || optimize_function_for_size_p (cfun))
&& (INTVAL (operands[3]) & 0x3f) == 0x3f"
"#"
@@ -14395,7 +14397,8 @@
(match_operand:QI 2 "register_operand" "r")))
(const_int 0)])
(label_ref (match_operand 3 "" ""))
- (pc)))]
+ (pc)))
+ (clobber (reg:CC FLAGS_REG))]
"TARGET_USE_BT || optimize_function_for_size_p (cfun)"
"#"
"&& 1"
@@ -14427,7 +14430,8 @@
(match_operand:SI 2 "register_operand" "r")
(match_operand:SI 3 "const_int_operand" "n")))])
(label_ref (match_operand 4 "" ""))
- (pc)))]
+ (pc)))
+ (clobber (reg:CC FLAGS_REG))]
"(TARGET_USE_BT || optimize_function_for_size_p (cfun))
&& (INTVAL (operands[3]) & 0x1f) == 0x1f"
"#"
@@ -14455,7 +14459,8 @@
(const_int 1))
(const_int 0)])
(label_ref (match_operand 3 "" ""))
- (pc)))]
+ (pc)))
+ (clobber (reg:CC FLAGS_REG))]
"TARGET_USE_BT || optimize_function_for_size_p (cfun)"
"#"
"&& 1"
@@ -14491,7 +14496,8 @@
(const_int 1))
(const_int 0)])
(label_ref (match_operand 4 "" ""))
- (pc)))]
+ (pc)))
+ (clobber (reg:CC FLAGS_REG))]
"(TARGET_USE_BT || optimize_function_for_size_p (cfun))
&& (INTVAL (operands[3]) & 0x1f) == 0x1f"
"#"