Add -malign-data={abi|compat|cachineline}
commitd0c02882a6ba8f5cebc2f5c90715770eeddd4675
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Dec 2014 14:22:57 +0000 (17 14:22 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Dec 2014 14:22:57 +0000 (17 14:22 +0000)
tree5ed4b6970db156cc051eed382941098982ed6791
parent0d391deb5eb413d52df258ee3b56f7b5e8e64981
Add -malign-data={abi|compat|cachineline}

Add -malign-data={abi|compat,cachineline} to control how GCC aligns
variables.  "compat" uses increased alignment value compatible with
GCC 4.8 and earlier, "abi" uses alignment value as specified by the
psABI, and "cacheline" uses increased alignment value to match the
cache line size.  "compat" is the default.

gcc/

PR target/61296
* config/i386/i386-opts.h (ix86_align_data): New enum.
* config/i386/i386.c (ix86_data_alignment): Return the ABI
alignment value for -malign-data=abi, the cachine line size
for -malign-data=cachineline and the older GCC compatible
alignment value for for -malign-data=compat.
* config/i386/i386.opt (malign-data=): New.
* doc/invoke.texi: Document -malign-data=.

gcc/testsuite/

PR target/61296
* gcc.target/i386/pr61296-2.c: New.
* gcc.target/i386/pr61296-2.c: Likewise.
* gcc.target/i386/pr61296-3.c: Likewise.
* gcc.target/i386/pr61296-4.c: Likewise.
* gcc.target/i386/pr61296-5.c: Likewise.
* gcc.target/i386/pr61296-6.c: Likewise.
* gcc.target/i386/pr61296-7.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218818 138bc75d-0d04-0410-961f-82ee72b054a4
13 files changed:
gcc/ChangeLog
gcc/config/i386/i386-opts.h
gcc/config/i386/i386.c
gcc/config/i386/i386.opt
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr61296-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr61296-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr61296-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr61296-4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr61296-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr61296-6.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr61296-7.c [new file with mode: 0644]