Blame SOURCES/gdb-rhbz1553104-s390x-arch12-3of6.patch

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