This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [testcase] ia32 extract_bit_field failure
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: [testcase] ia32 extract_bit_field failure
- From: DJ Delorie <dj at redhat dot com>
- Date: Tue, 30 Jan 2001 21:54:33 -0500
- CC: Jakub Jelinek <jakub at redhat@cygnus.com>, dj at greed dot delorie dot com
> * gcc.c-torture/compile/20001212-1.c: New test.
How's this?
2001-01-30 DJ Delorie <dj@redhat.com>
* expmed.c (extract_bit_field): allow non-integral modes if we
want to extract a whole register from itself.
Index: expmed.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expmed.c,v
retrieving revision 1.75
diff -p -3 -r1.75 expmed.c
*** expmed.c 2001/01/21 09:19:15 1.75
--- expmed.c 2001/01/31 02:53:12
*************** extract_bit_field (str_rtx, bitsize, bit
*** 1027,1032 ****
--- 1027,1041 ----
op0 = SUBREG_REG (op0);
}
+ if (GET_CODE (op0) == REG
+ && mode == GET_MODE (op0)
+ && bitnum == 0
+ && bitsize == GET_MODE_BITSIZE (GET_MODE (op0)))
+ {
+ /* We're trying to extract a full register from itself. */
+ return op0;
+ }
+
/* Make sure we are playing with integral modes. Pun with subregs
if we aren't. */
{