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

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