public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Committed] S/390: z10 support handle BLKmode when checking symref  alignment
@ 2009-10-13 11:07 Andreas Krebbel
  0 siblings, 0 replies; only message in thread
From: Andreas Krebbel @ 2009-10-13 11:07 UTC (permalink / raw)
  To: gcc-patches

Hi,

some z10 instructions require the relative address operand to be
naturally aligned.  The check setting the respective symbol_ref rtl
flags relies on the mode size and therefore does not handle BLKmode
properly. Fixed with the attached patch.

Committed to mainline. 

OK for the GCC 4.4.2 release branch?

Bye,

-Andreas-


2009-10-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/s390/s390.c (s390_encode_section_info): Handle BLKmode
	properly.


Index: gcc/config/s390/s390.c
===================================================================
--- gcc/config/s390/s390.c.orig	2009-10-12 17:17:00.000000000 +0200
+++ gcc/config/s390/s390.c	2009-10-12 17:17:33.000000000 +0200
@@ -8938,6 +8938,7 @@ s390_encode_section_info (tree decl, rtx
       && GET_CODE (XEXP (rtl, 0)) == SYMBOL_REF
       && TREE_CONSTANT_POOL_ADDRESS_P (XEXP (rtl, 0))
       && (MEM_ALIGN (rtl) == 0
+	  || GET_MODE_BITSIZE (GET_MODE (rtl)) == 0
 	  || MEM_ALIGN (rtl) < GET_MODE_BITSIZE (GET_MODE (rtl))))
     SYMBOL_REF_FLAGS (XEXP (rtl, 0)) |= SYMBOL_FLAG_NOT_NATURALLY_ALIGNED;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-13 10:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-13 11:07 [Committed] S/390: z10 support handle BLKmode when checking symref alignment Andreas Krebbel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).