+2005-02-22 Stan Shebs <shebs@apple.com>
+
+ * 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.
+
2005-02-22 DJ Delorie <dj@redhat.com>
* c-common.c (c_common_type_for_mode): Pass the mode's precision
#if TARGET_MACHO
darwin_one_byte_bool = "";
#endif
+ /* Default to natural alignment, for better performance. */
+ rs6000_alignment_flags = MASK_ALIGN_NATURAL;
}
/* Handle -mabi= options. */
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
@itemx -malign-power
@opindex malign-natural
@opindex malign-power
-On AIX, Darwin, and 64-bit PowerPC GNU/Linux, the option
+On AIX, 32-bit Darwin, and 64-bit PowerPC GNU/Linux, the option
@option{-malign-natural} overrides the ABI-defined alignment of larger
types, such as floating-point doubles, on their natural size-based boundary.
The option @option{-malign-power} instructs GCC to follow the ABI-specified
alignment rules. GCC defaults to the standard alignment defined in the ABI@.
+On 64-bit Darwin, natural alignment is the default, and @option{-malign-power}
+is not supported.
+
@item -msoft-float
@itemx -mhard-float
@opindex msoft-float