* config/tc-ppc.c (md_parse_option): Make -maltivec default
[binutils-gdb.git] / gas / config / tc-ppc.c
index a39440846338b43408a433b6f2c229fd8102d78a..5ece16b0a2714b90ea50913cfa293dac72d93564 100644 (file)
@@ -897,7 +897,12 @@ md_parse_option (c, arg)
                || strcmp (arg, "7455") == 0)
        ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC;
       else if (strcmp (arg, "altivec") == 0)
-       ppc_cpu |= PPC_OPCODE_ALTIVEC;
+        {
+          if (ppc_cpu == 0)
+            ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC;
+          else
+            ppc_cpu |= PPC_OPCODE_ALTIVEC;
+        }
       /* -mppc64 and -m620 mean to assemble for the 64-bit PowerPC
         620.  */
       else if (strcmp (arg, "ppc64") == 0 || strcmp (arg, "620") == 0)