[patch s390] Allow ofsetted GOT references

DJ Delorie dj@redhat.com
Wed Aug 16 20:11:00 GMT 2006


This change allows you to, for example, reference the lower subreg of
an address in the GOT (i.e. the lower 32 bits when in 64 bit mode).
This fixes an ICE in the compiler when assigning __builtin_strlen() to
a 32 bit int, and comparing it to zero.  The optimizer just compares
the lower 32 bits of the start/end addresses.  Ok to apply?


2006-08-16  DJ Delorie  <dj@redhat.com>

	* config/s390/s390.c (s390_decompose_address): Allow symbol+offset
	into the GOT in case we need a subreg of the address.

Index: config/s390/s390.c
===================================================================
--- config/s390/s390.c	(revision 116186)
+++ config/s390/s390.c	(working copy)
@@ -1739,7 +1739,6 @@ s390_decompose_address (rtx addr, struct
       if (GET_CODE (disp) == UNSPEC
           && (XINT (disp, 1) == UNSPEC_GOT
 	      || XINT (disp, 1) == UNSPEC_GOTNTPOFF)
-	  && offset == 0
 	  && flag_pic == 1)
         {
 	  ;



More information about the Gcc-patches mailing list