OSDN Git Service

gcc/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Jan 2007 09:35:13 +0000 (09:35 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Jan 2007 09:35:13 +0000 (09:35 +0000)
* 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
gcc/config/m68k/m68k.h

index 2c0be89..910bfb9 100644 (file)
@@ -1,3 +1,9 @@
+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.
index aa70a7f..030dc4d 100644 (file)
@@ -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__");                             \