S/390: Add support for section anchors
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 3 Dec 2018 15:07:36 +0000 (15:07 +0000)
committerIlya Leoshkevich <iii@gcc.gnu.org>
Mon, 3 Dec 2018 15:07:36 +0000 (15:07 +0000)
commit8c66130b1f8460773912ca3a915f657db466fd39
tree56635cab8a70cc95eb2513f0a3b9651ae77860aa
parentdf3fdfa67f485cf68f62b555fb9bb8015fb9e3ad
S/390: Add support for section anchors

gcc/ChangeLog:

2018-12-03  Ilya Leoshkevich  <iii@linux.ibm.com>

* common/config/s390/s390-common.c (s390_option_init_struct):
Use section anchors by default.
* config/s390/s390.c (s390_check_symref_alignment): Handle
anchors.
(TARGET_MAX_ANCHOR_OFFSET): Use short displacement.
* output.h (assemble_align): Pass `align' as unsigned int, so
that the value 0x80000000, which corresponds to `aligned(1 <<
28)', would pass the `align > BITS_PER_UNIT' check.
* varasm.c (assemble_align): Likewise.

gcc/testsuite/ChangeLog:

2018-12-03  Ilya Leoshkevich  <iii@linux.ibm.com>

* gcc.target/s390/nodatarel-1.c: Expect .LANCHOR0@GOTENT instead
of a@GOTENT.
* gcc.target/s390/section-anchors.c: New test.
* gcc.target/s390/section-anchors2.c: New test.
* gcc.target/s390/section-anchors3.c: New test.

From-SVN: r266741
gcc/ChangeLog
gcc/common/config/s390/s390-common.c
gcc/config/s390/s390.c
gcc/output.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/s390/nodatarel-1.c
gcc/testsuite/gcc.target/s390/section-anchors.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/section-anchors2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/section-anchors3.c [new file with mode: 0644]
gcc/varasm.c