The -malign-double flag causes i64 and f64 types to have alignment 8
instead of 4. On x86-64, -malign-double is enabled by default.
Details
Details
- Reviewers
- None
Diff Detail
Diff Detail
Event Timeline
Comment Actions
GCC's description is:
-malign-double -mno-align-double Control whether GCC aligns double, long double, and long long variables on a two word boundary or a one word boundary. Aligning double variables on a two word boundary will produce code that runs somewhat faster on a `Pentium' at the expense of more memory. On x86-64, -malign-double is enabled by default. Warning: if you use the -malign-double switch, structures containing the above types will be aligned differently than the published application binary interface specifications for the 386 and will not be binary compatible with structures in code compiled without that switch.
I think this should be similar.
Could you also check stack spill alignment?
Could you also test the following from GCC's test suite:
./gcc/testsuite/g++.old-deja/g++.abi/bitfields.C ./gcc/testsuite/g++.old-deja/g++.abi/aggregates.C ./gcc/testsuite/g++.old-deja/g++.abi/align.C