41ba02
commit 952c3f51ac994f5e98aa829076609124cf9e5243
41ba02
Author: Andreas Krebbel <krebbel@linux.vnet.ibm.com>
41ba02
Date:   Mon Sep 12 16:32:02 2016 +0200
41ba02
41ba02
    S/390: Add alternate processor names.
41ba02
    
41ba02
    This patch adds alternate CPU names which adhere to the number of the
41ba02
    architecture document.  So instead of having z196, zEC12, and z13 you
41ba02
    can use arch9, arch10, and arch11.  The old cpu names stay valid and
41ba02
    should primarily be used.
41ba02
    
41ba02
    The alternate names are supposed to improve compatibility with the IBM
41ba02
    XL compiler toolchain which uses the arch numbering.
41ba02
    
41ba02
    opcodes/ChangeLog:
41ba02
    
41ba02
    2016-09-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
41ba02
    
41ba02
            * s390-mkopc.c (main): Support alternate arch strings.
41ba02
    
41ba02
    gas/ChangeLog:
41ba02
    
41ba02
    2016-09-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
41ba02
    
41ba02
            * config/tc-s390.c (s390_parse_cpu): Support alternate arch
41ba02
            strings.
41ba02
            * doc/as.texinfo: Document new arch strings.
41ba02
            * doc/c-s390.texi: Likewise.
41ba02
41ba02
### a/opcodes/ChangeLog
41ba02
### b/opcodes/ChangeLog
41ba02
## -1,3 +1,7 @@
41ba02
+2016-09-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
41ba02
+
41ba02
+	* s390-mkopc.c (main): Support alternate arch strings.
41ba02
+
41ba02
 2016-09-12  Patrick Steuer  <steuer@linux.vnet.ibm.com>
41ba02
 
41ba02
 	* s390-opc.txt: Fix kmctr instruction type.
41ba02
--- a/opcodes/s390-mkopc.c
41ba02
+++ b/opcodes/s390-mkopc.c
41ba02
@@ -334,7 +334,7 @@ main (void)
41ba02
       char  *str;
41ba02
 
41ba02
       if (currentLine[0] == '#' || currentLine[0] == '\n')
41ba02
-        continue;
41ba02
+	continue;
41ba02
       memset (opcode, 0, 8);
41ba02
       num_matched =
41ba02
 	sscanf (currentLine, "%15s %15s %15s \"%79[^\"]\" %15s %15s %79[^\n]",
41ba02
@@ -346,25 +346,33 @@ main (void)
41ba02
 	  exit (1);
41ba02
 	}
41ba02
 
41ba02
-      if (strcmp (cpu_string, "g5") == 0)
41ba02
+      if (strcmp (cpu_string, "g5") == 0
41ba02
+	  || strcmp (cpu_string, "arch3") == 0)
41ba02
 	min_cpu = S390_OPCODE_G5;
41ba02
       else if (strcmp (cpu_string, "g6") == 0)
41ba02
 	min_cpu = S390_OPCODE_G6;
41ba02
-      else if (strcmp (cpu_string, "z900") == 0)
41ba02
+      else if (strcmp (cpu_string, "z900") == 0
41ba02
+	       || strcmp (cpu_string, "arch5") == 0)
41ba02
 	min_cpu = S390_OPCODE_Z900;
41ba02
-      else if (strcmp (cpu_string, "z990") == 0)
41ba02
+      else if (strcmp (cpu_string, "z990") == 0
41ba02
+	       || strcmp (cpu_string, "arch6") == 0)
41ba02
 	min_cpu = S390_OPCODE_Z990;
41ba02
       else if (strcmp (cpu_string, "z9-109") == 0)
41ba02
 	min_cpu = S390_OPCODE_Z9_109;
41ba02
-      else if (strcmp (cpu_string, "z9-ec") == 0)
41ba02
+      else if (strcmp (cpu_string, "z9-ec") == 0
41ba02
+	       || strcmp (cpu_string, "arch7") == 0)
41ba02
 	min_cpu = S390_OPCODE_Z9_EC;
41ba02
-      else if (strcmp (cpu_string, "z10") == 0)
41ba02
+      else if (strcmp (cpu_string, "z10") == 0
41ba02
+	       || strcmp (cpu_string, "arch8") == 0)
41ba02
 	min_cpu = S390_OPCODE_Z10;
41ba02
-      else if (strcmp (cpu_string, "z196") == 0)
41ba02
+      else if (strcmp (cpu_string, "z196") == 0
41ba02
+	       || strcmp (cpu_string, "arch9") == 0)
41ba02
 	min_cpu = S390_OPCODE_Z196;
41ba02
-      else if (strcmp (cpu_string, "zEC12") == 0)
41ba02
+      else if (strcmp (cpu_string, "zEC12") == 0
41ba02
+	       || strcmp (cpu_string, "arch10") == 0)
41ba02
 	min_cpu = S390_OPCODE_ZEC12;
41ba02
-      else if (strcmp (cpu_string, "z13") == 0)
41ba02
+      else if (strcmp (cpu_string, "z13") == 0
41ba02
+	       || strcmp (cpu_string, "arch11") == 0)
41ba02
 	min_cpu = S390_OPCODE_Z13;
41ba02
       else {
41ba02
 	fprintf (stderr, "Couldn't parse cpu string %s\n", cpu_string);