diff options
author | Michael Meissner <meissner@linux.vnet.ibm.com> | 2012-10-19 19:10:03 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 2012-10-19 19:10:03 +0000 |
commit | ad1a0853e6c4b8a8a62aaec5d349bb240bd72255 (patch) | |
tree | b1169cdb2e369d59a4fdc2661831f4a810066dbe /libobjc/encoding.c | |
parent | 704fc8502fc5ac926349d11d4b6622493e4492fb (diff) | |
download | gcc-ad1a0853e6c4b8a8a62aaec5d349bb240bd72255.zip gcc-ad1a0853e6c4b8a8a62aaec5d349bb240bd72255.tar.gz gcc-ad1a0853e6c4b8a8a62aaec5d349bb240bd72255.tar.bz2 |
rs6000-cpus.def (POWERPC_MASKS): Don't assume OPTION_MASK_STRICT_ALIGN is defined.
[gcc]
2012-10-19 Michael Meissner <meissner@linux.vnet.ibm.com>
Dominique Dhumieres <dominiq@lps.ens.fr>
* config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Don't assume
OPTION_MASK_STRICT_ALIGN is defined.
(MASK_STRICT_ALIGN): If OPTION_MASK_STRICT_ALIGN is not defined,
define this to 0 for the 3 ports that use it.
* config/rs6000/rs6000.c (OPTION_MASK_STRICT_ALIGN): Don't do
check for ports not having -mstrict-align here, move test to
rs6000-cpus.def.
(MASK_STRICT_ALIGN): Likewise.
(rs6000_debug_reg_global): Print out correct target flag words if
-mdebug=reg.
[libobjc]
2012-10-19 Michael Meissner <meissner@linux.vnet.ibm.com>
* encoding.c (TARGET_VSX): Provide definitions based on the
current compilation options, and not based off the target options
structure.
(TARGET_ALTIVEC): Likewise.
(TARGET_64BIT): Likewise.
Co-Authored-By: Dominique d'Humieres <dominiq@lps.ens.fr>
From-SVN: r192623
Diffstat (limited to 'libobjc/encoding.c')
-rw-r--r-- | libobjc/encoding.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libobjc/encoding.c b/libobjc/encoding.c index bd8b67e..7e33e73 100644 --- a/libobjc/encoding.c +++ b/libobjc/encoding.c @@ -112,6 +112,32 @@ static int __attribute__ ((__unused__)) not_target_flags = 0; #undef ALTIVEC_VECTOR_MODE #define ALTIVEC_VECTOR_MODE(MODE) (0) +/* Replace TARGET_VSX, TARGET_ALTIVEC, and TARGET_64BIT with constants based on + the current switches, rather than looking in the options structure. */ +#ifdef _ARCH_PPC +#undef TARGET_VSX +#undef TARGET_ALTIVEC +#undef TARGET_64BIT + +#ifdef __VSX__ +#define TARGET_VSX 1 +#else +#define TARGET_VSX 0 +#endif + +#ifdef __ALTIVEC__ +#define TARGET_ALTIVEC 1 +#else +#define TARGET_ALTIVEC 0 +#endif + +#ifdef _ARCH_PPC64 +#define TARGET_64BIT 1 +#else +#define TARGET_64BIT 0 +#endif +#endif + /* Furthermore, some (powerpc) targets also use TARGET_ALIGN_NATURAL in their alignment macros. Currently[4.5/6], rs6000.h points this to a static variable, initialized by target overrides. This is reset |