diff options
author | Stan Shebs <shebs@apple.com> | 2005-02-22 23:38:02 +0000 |
---|---|---|
committer | Stan Shebs <shebs@gcc.gnu.org> | 2005-02-22 23:38:02 +0000 |
commit | d9168963faf3ab1cac154a8f1af6616a350796a9 (patch) | |
tree | c138a8c9b913e385ffc73ad306ae6605dc43a6b8 /gcc/config/rs6000 | |
parent | 38f925677d2204473981350cb0dfd28eb65fd45b (diff) | |
download | gcc-d9168963faf3ab1cac154a8f1af6616a350796a9.zip gcc-d9168963faf3ab1cac154a8f1af6616a350796a9.tar.gz gcc-d9168963faf3ab1cac154a8f1af6616a350796a9.tar.bz2 |
rs6000.c (rs6000_override_options): Default to natural alignment for 64-bit Darwin.
* config/rs6000/rs6000.c (rs6000_override_options): Default to
natural alignment for 64-bit Darwin.
(rs6000_parse_alignment_option): Warn about uses of -malign-power
on 64-bit Darwin.
* doc/invoke.texi: Document this.
From-SVN: r95420
Diffstat (limited to 'gcc/config/rs6000')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 267a161..ea5c010 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1316,6 +1316,8 @@ rs6000_override_options (const char *default_cpu) #if TARGET_MACHO darwin_one_byte_bool = ""; #endif + /* Default to natural alignment, for better performance. */ + rs6000_alignment_flags = MASK_ALIGN_NATURAL; } /* Handle -mabi= options. */ @@ -1684,7 +1686,16 @@ rs6000_parse_alignment_option (void) if (rs6000_alignment_string == 0) return; else if (! strcmp (rs6000_alignment_string, "power")) - rs6000_alignment_flags = MASK_ALIGN_POWER; + { + /* On 64-bit Darwin, power alignment is ABI-incompatible with + some C library functions, so warn about it. The flag may be + useful for performance studies from time to time though, so + don't disable it entirely. */ + if (DEFAULT_ABI == ABI_DARWIN && TARGET_64BIT) + warning ("-malign-power is not supported for 64-bit Darwin;" + " it is incompatible with the installed C and C++ libraries"); + rs6000_alignment_flags = MASK_ALIGN_POWER; + } else if (! strcmp (rs6000_alignment_string, "natural")) rs6000_alignment_flags = MASK_ALIGN_NATURAL; else |