Skip to content
Snippets Groups Projects
Commit a37b5bcf authored by Peter Bergner's avatar Peter Bergner
Browse files

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.
parent 659ba632
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment