S/390: Fix symbol ref alignment
authorkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 23 Nov 2015 08:05:33 +0000 (08:05 +0000)
committerkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 23 Nov 2015 08:05:33 +0000 (08:05 +0000)
commit78affa36564dbdafeb120d78374b9a876f8174cb
treef06f2517d73d42a2b0cfdbbf9e92039a2fbf3069
parent14b5bae1fd51987b27a755138c7155f54591dbf2
S/390: Fix symbol ref alignment

This patch fixes the treatment of symbol ref alignments for
arrays and structs in S390. Until now, the NOT_NATURALLY_ALIGNED flag
was not correctly set for array elements and structs larger than 8
bytes. Therefore, load relative instructions that require a specific
alignment would not always be generated. This patch uses separate flags
for 2-, 4-, and 8-byte alignment to fix the problem.

gcc/testsuite/ChangeLog:

2015-11-23  Robin Dapp  <rdapp@linux.vnet.ibm.com>

        * gcc.target/s390/load-relative-check.c: New test to check
        generation of load relative instructions.

gcc/ChangeLog:

2015-11-23  Robin Dapp  <rdapp@linux.vnet.ibm.com>

        * config/s390/s390.h: Add new symref flags, _NOTALIGN2 etc.
        * config/s390/s390.c (s390_check_symref_alignment): Use new
        symref flags, early abort on wrong alignment
        (s390_secondary_reload): Use new symref flags.
        (s390_encode_section_info): Likewise.
        * config/s390/predicates.md: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230735 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/s390/predicates.md
gcc/config/s390/s390.c
gcc/config/s390/s390.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/s390/load-relative-check.c [new file with mode: 0644]