This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Committed] S/390: z10 support handle BLKmode when checking symref alignment
- From: "Andreas Krebbel" <krebbel at linux dot vnet dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 13 Oct 2009 12:52:23 +0200
- Subject: [Committed] S/390: z10 support handle BLKmode when checking symref alignment
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;
}