This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
testqi_ext_3 fix
- To: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com, patches at x86-64 dot org
- Subject: testqi_ext_3 fix
- From: Jan Hubicka <jh at suse dot cz>
- Date: Sun, 6 May 2001 16:53:17 +0200
Hi,
making HOST_WIDE_INT 64bit triggered this problem:
Ne kvě 6 16:43:46 CEST 2001 Jan Hubicka <jh@suse.cz>
* i386.md (testqi_ext_3, textqi_ext_rex64): Verify that resulting
mask is sign or zero extended constant.
*** i386.md.old Sun May 6 15:56:46 2001
--- i386.md Sun May 6 15:53:38 2001
***************
*** 8089,8094 ****
--- 8089,8100 ----
(match_operand:SI 2 "const_int_operand" ""))
(const_int 0)))]
"ix86_match_ccmode (insn, CCNOmode)
+ /* The code bellow cannot deal with constants outside HOST_WIDE_INT. */
+ && INTVAL (operands[1]) + INTVAL (operands[2]) < HOST_BITS_PER_WIDE_INT
+ /* Ensure that resulting mask is zero or sign extended operand. */
+ && (INTVAL (operands[1]) + INTVAL (operands[2]) <= 32
+ || (INTVAL (operands[1]) + INTVAL (operands[2]) == 64
+ && INTVAL (operands[1]) > 32))
&& (GET_MODE (operands[0]) == SImode
|| (TARGET_64BIT && GET_MODE (operands[0]) == DImode)
|| GET_MODE (operands[0]) == HImode
***************
*** 8104,8109 ****
--- 8110,8121 ----
(const_int 0)))]
"ix86_match_ccmode (insn, CCNOmode)
&& TARGET_64BIT
+ /* The code bellow cannot deal with constants outside HOST_WIDE_INT. */
+ && INTVAL (operands[1]) + INTVAL (operands[2]) < HOST_BITS_PER_WIDE_INT
+ /* Ensure that resulting mask is zero or sign extended operand. */
+ && (INTVAL (operands[1]) + INTVAL (operands[2]) <= 32
+ || (INTVAL (operands[1]) + INTVAL (operands[2]) == 64
+ && INTVAL (operands[1]) > 32))
&& (GET_MODE (operands[0]) == SImode
|| GET_MODE (operands[0]) == DImode
|| GET_MODE (operands[0]) == HImode