This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ICE breaks glibc compilation on PPC
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: ICE breaks glibc compilation on PPC
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Tue, 19 Sep 2000 00:21:24 +0200
- Cc: gcc-bugs at gcc dot gnu dot org,Alexandre Oliva <aoliva at redhat dot com>
- References: <00091723181001.09471@enzo.bigblue.local>
On Sun, 17 Sep 2000, Franz Sirl wrote:
> Hi,
>
> the appended testcase breaks glibc compilation on Linux/PPC.
This is caused by this change:
2000-09-01 Alexandre Oliva <aoliva@redhat.com>
* stmt.c (expand_asm_operands): Likewise. Give an
ASM_OPERANDS rtx the mode of the output reg being set from it.
The appended patch fixes it for me, it prevents combine from stripping of the
SUBREG of a pattern with an ASM_OPERAND like:
(subreg:SI (asm_operands/v:DF ("mffs %0") ("=f") 0[ ]
[ ] ("fgetexcptflg.c") 16) 1)
OK to commit?
Franz.
* emit-rtl.c (subreg_lowpart_p): Don't return true for the SUBREG of an
ASM_OPERAND.
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/emit-rtl.c,v
retrieving revision 1.146
diff -u -p -r1.146 emit-rtl.c
--- emit-rtl.c 2000/09/11 01:50:46 1.146
+++ emit-rtl.c 2000/09/18 22:24:08
@@ -1188,6 +1188,8 @@ subreg_lowpart_p (x)
return 1;
else if (GET_MODE (SUBREG_REG (x)) == VOIDmode)
return 0;
+ else if (GET_CODE (SUBREG_REG (x)) == ASM_OPERANDS)
+ return 0;
if (WORDS_BIG_ENDIAN
&& GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))) > UNITS_PER_WORD)