+2007-01-12 Richard Sandiford <richard@codesourcery.com>
+
+ * config/m68k/m68k.h (TARGET_CPU_CPP_BUILTINS): Treat all mc68*
+ macros besides mc68000 as tuning macros. Use a switch statement
+ to set them and mcpu32.
+
2007-01-12 Julian Brown <julian@codesourcery.com>
* config/m68k/m68k.h: Use TARGET_68040 instead of TARGET_68040_ONLY.
{ \
builtin_define ("__m68k__"); \
builtin_define_std ("mc68000"); \
- if (TARGET_68040) \
- { \
- if (TUNE_68060) \
- builtin_define_std ("mc68060"); \
- else \
- builtin_define_std ("mc68040"); \
- } \
- else if (TUNE_68060) /* -m68020-60 */ \
+ /* The other mc680x0 macros have traditionally been derived \
+ from the tuning setting. For example, -m68020-60 defines \
+ m68060, even though it generates pure 68020 code. */ \
+ switch (m68k_tune) \
{ \
+ case u68010: \
+ builtin_define_std ("mc68010"); \
+ break; \
+ \
+ case u68020: \
+ builtin_define_std ("mc68020"); \
+ break; \
+ \
+ case u68030: \
+ builtin_define_std ("mc68030"); \
+ break; \
+ \
+ case u68040: \
+ builtin_define_std ("mc68040"); \
+ break; \
+ \
+ case u68060: \
+ builtin_define_std ("mc68060"); \
+ break; \
+ \
+ case u68020_60: \
builtin_define_std ("mc68060"); \
+ /* Fall through. */ \
+ case u68020_40: \
builtin_define_std ("mc68040"); \
builtin_define_std ("mc68030"); \
builtin_define_std ("mc68020"); \
- } \
- else if (TUNE_68040) /* -m68020-40 */ \
- { \
- builtin_define_std ("mc68040"); \
- builtin_define_std ("mc68030"); \
+ break; \
+ \
+ case ucpu32: \
+ builtin_define_std ("mc68332"); \
+ builtin_define_std ("mcpu32"); \
builtin_define_std ("mc68020"); \
+ break; \
+ \
+ default: \
+ break; \
} \
- else if (TUNE_68030) \
- builtin_define_std ("mc68030"); \
- else if (TARGET_68020) \
- builtin_define_std ("mc68020"); \
- else if (TUNE_68010) \
- builtin_define_std ("mc68010"); \
+ \
if (TARGET_68881) \
builtin_define ("__HAVE_68881__"); \
- if (TUNE_CPU32) \
- { \
- builtin_define_std ("mc68332"); \
- builtin_define_std ("mcpu32"); \
- } \
+ \
if (TARGET_COLDFIRE) \
{ \
builtin_define ("__mcoldfire__"); \