This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ICE breaks glibc compilation on PPC


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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]