From 3d110987ab8695101fb015d2df56623499faf08f Mon Sep 17 00:00:00 2001 From: rsandifo Date: Fri, 12 Jan 2007 09:35:13 +0000 Subject: [PATCH] gcc/ * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120715 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 +++++ gcc/config/m68k/m68k.h | 62 +++++++++++++++++++++++++++++++------------------- 2 files changed, 44 insertions(+), 24 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2c0be89..910bfb9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-01-12 Richard Sandiford + + * 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 * config/m68k/m68k.h: Use TARGET_68040 instead of TARGET_68040_ONLY. diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h index aa70a7f..030dc4d 100644 --- a/gcc/config/m68k/m68k.h +++ b/gcc/config/m68k/m68k.h @@ -67,39 +67,53 @@ Boston, MA 02110-1301, USA. */ { \ 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__"); \ -- 2.7.4