]> gcc.gnu.org Git - gcc.git/commit
rs6000: Fix default alignment ABI break caused by MMA base support
authorPeter Bergner <bergner@linux.ibm.com>
Fri, 6 Nov 2020 23:00:49 +0000 (17:00 -0600)
committerPeter Bergner <bergner@linux.ibm.com>
Fri, 6 Nov 2020 23:01:18 +0000 (17:01 -0600)
commita37b5bcf15a682f22ac10d8b7069aa8d115caaef
tree1cd51135243b153c9e24ad2600f41c995c728f75
parent659ba632e440280e8d61e1ae870e917765db5ae5
rs6000: Fix default alignment ABI break caused by MMA base support

As part of the MMA base support, we incremented BIGGEST_ALIGNMENT in
order to align the __vector_pair and __vector_quad types to 256 and 512
bytes respectively.  This had the unintended effect of changing the
default alignment used by __attribute__ ((__aligned__)) which causes
an ABI break because of some dodgy code in GLIBC's struct pthread.
The fix is to revert the BIGGEST_ALIGNMENT change and to force the
alignment on the type itself rather than the mode used by the type.

2020-11-06  Peter Bergner  <bergner@linux.ibm.com>

gcc/
* config/rs6000/rs6000.h (BIGGEST_ALIGNMENT): Revert previous commit
so as not to break the ABI.
* config/rs6000/rs6000-call.c (rs6000_init_builtins): Set the ABI
mandated alignment for __vector_pair and __vector_quad types.

gcc/testsuite/
* gcc.target/powerpc/mma-alignment.c: New test.
gcc/config/rs6000/rs6000-call.c
gcc/config/rs6000/rs6000.h
gcc/testsuite/gcc.target/powerpc/mma-alignment.c [new file with mode: 0644]
This page took 0.058339 seconds and 5 git commands to generate.