S/390: Remove mode size check in encode_section_info.
With the last change the not-aligned symbol ref markers are always set for modes with size zero. This is wrong since for larl the size of the access does not matter. This patch removes that check entirely from s390_encode_section_info. Modes with a size of 0 get rejected in s390_check_symref_alignment which is used for the load/store relative instructions to check for natural alignment. Bootstrapped and regression tested on s390 and s390x with --with-arch=z900 and --with-arch=z13. gcc/ChangeLog: 2016-07-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com> * config/s390/s390.c (s390_encode_section_info): Remove mode size check. From-SVN: r238536
This commit is contained in:
parent
09a855ae3c
commit
1397e16301
|
@ -1,3 +1,8 @@
|
||||||
|
2016-07-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
|
||||||
|
|
||||||
|
* config/s390/s390.c (s390_encode_section_info): Remove mode size
|
||||||
|
check.
|
||||||
|
|
||||||
2016-07-20 Uros Bizjak <ubizjak@gmail.com>
|
2016-07-20 Uros Bizjak <ubizjak@gmail.com>
|
||||||
|
|
||||||
* cse.c: Use HOST_WIDE_INT_M1 instead of ~(HOST_WIDE_INT) 0.
|
* cse.c: Use HOST_WIDE_INT_M1 instead of ~(HOST_WIDE_INT) 0.
|
||||||
|
|
|
@ -12413,8 +12413,7 @@ s390_encode_section_info (tree decl, rtx rtl, int first)
|
||||||
/* Store the alignment to be able to check if we can use
|
/* Store the alignment to be able to check if we can use
|
||||||
a larl/load-relative instruction. We only handle the cases
|
a larl/load-relative instruction. We only handle the cases
|
||||||
that can go wrong (i.e. no FUNC_DECLs). */
|
that can go wrong (i.e. no FUNC_DECLs). */
|
||||||
if (DECL_ALIGN (decl) == 0
|
if (DECL_ALIGN (decl) == 0 || DECL_ALIGN (decl) % 16)
|
||||||
|| DECL_ALIGN (decl) % 16)
|
|
||||||
SYMBOL_FLAG_SET_NOTALIGN2 (XEXP (rtl, 0));
|
SYMBOL_FLAG_SET_NOTALIGN2 (XEXP (rtl, 0));
|
||||||
else if (DECL_ALIGN (decl) % 32)
|
else if (DECL_ALIGN (decl) % 32)
|
||||||
SYMBOL_FLAG_SET_NOTALIGN4 (XEXP (rtl, 0));
|
SYMBOL_FLAG_SET_NOTALIGN4 (XEXP (rtl, 0));
|
||||||
|
@ -12429,9 +12428,7 @@ s390_encode_section_info (tree decl, rtx rtl, int first)
|
||||||
&& GET_CODE (XEXP (rtl, 0)) == SYMBOL_REF
|
&& GET_CODE (XEXP (rtl, 0)) == SYMBOL_REF
|
||||||
&& TREE_CONSTANT_POOL_ADDRESS_P (XEXP (rtl, 0)))
|
&& TREE_CONSTANT_POOL_ADDRESS_P (XEXP (rtl, 0)))
|
||||||
{
|
{
|
||||||
if (MEM_ALIGN (rtl) == 0
|
if (MEM_ALIGN (rtl) == 0 || MEM_ALIGN (rtl) % 16)
|
||||||
|| GET_MODE_SIZE (GET_MODE (rtl)) == 0
|
|
||||||
|| MEM_ALIGN (rtl) % 16)
|
|
||||||
SYMBOL_FLAG_SET_NOTALIGN2 (XEXP (rtl, 0));
|
SYMBOL_FLAG_SET_NOTALIGN2 (XEXP (rtl, 0));
|
||||||
else if (MEM_ALIGN (rtl) % 32)
|
else if (MEM_ALIGN (rtl) % 32)
|
||||||
SYMBOL_FLAG_SET_NOTALIGN4 (XEXP (rtl, 0));
|
SYMBOL_FLAG_SET_NOTALIGN4 (XEXP (rtl, 0));
|
||||||
|
|
Loading…
Reference in New Issue