Let user choice of -mmultiple always override processor default.
authorMichael Meissner <meissner@gcc.gnu.org>
Fri, 24 Mar 1995 20:09:42 +0000 (20:09 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Fri, 24 Mar 1995 20:09:42 +0000 (20:09 +0000)
From-SVN: r9228

gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.h

index 6027fce..a905a33 100644 (file)
@@ -154,6 +154,8 @@ rs6000_override_options ()
 
   int ptt_size = sizeof (processor_target_table) / sizeof (struct ptt);
 
+  int multiple = TARGET_MULTIPLE;      /* save current -mmultiple/-mno-multiple status */
+
   profile_block_flag = 0;
 
   /* Identify the processor type */
@@ -177,6 +179,11 @@ rs6000_override_options ()
          rs6000_cpu = PROCESSOR_DEFAULT;
        }
     }
+
+  /* If -mmultiple or -mno-multiple was explicitly used, don't
+     override with the processor default */
+  if (TARGET_MULTIPLE_SET)
+    target_flags = (target_flags & ~MASK_MULTIPLE) | multiple;
 }
 \f
 /* Return non-zero if this function is known to have a null epilogue.  */
index d5988c3..1b6adb8 100644 (file)
@@ -155,6 +155,7 @@ extern int target_flags;
 
 /* Enable load/store multiple, even on powerpc */
 #define        MASK_MULTIPLE           0x1000
+#define        MASK_MULTIPLE_SET       0x2000
 
 #define TARGET_POWER                   (target_flags & MASK_POWER)
 #define TARGET_POWER2                  (target_flags & MASK_POWER2)
@@ -169,6 +170,7 @@ extern int target_flags;
 #define TARGET_64BIT                   (target_flags & MASK_64BIT)
 #define TARGET_SOFT_FLOAT              (target_flags & MASK_SOFT_FLOAT)
 #define        TARGET_MULTIPLE                 (target_flags & MASK_MULTIPLE)
+#define        TARGET_MULTIPLE_SET             (target_flags & MASK_MULTIPLE_SET)
 
 #define TARGET_HARD_FLOAT              (! TARGET_SOFT_FLOAT)
 
@@ -210,8 +212,9 @@ extern int target_flags;
   {"no-minimal-toc",   - MASK_MINIMAL_TOC},                    \
   {"hard-float",       - MASK_SOFT_FLOAT},                     \
   {"soft-float",       MASK_SOFT_FLOAT},                       \
-  {"multiple",         MASK_MULTIPLE},                         \
+  {"multiple",         MASK_MULTIPLE | MASK_MULTIPLE_SET},     \
   {"no-multiple",      - MASK_MULTIPLE},                       \
+  {"no-multiple",      MASK_MULTIPLE_SET},                     \
   SUBTARGET_SWITCHES                                           \
   {"",                 TARGET_DEFAULT}}