aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Krebbel <Andreas.Krebbel@de.ibm.com>2010-11-25 09:33:54 +0000
committerAndreas Krebbel <Andreas.Krebbel@de.ibm.com>2010-11-25 09:33:54 +0000
commit1e8766d7c9c6cfa35b4c057998fa7f31f6c3b450 (patch)
treec300c57f6e7b37854a9b5818c37349fb450ffdab
parent1de34e0afe0fa7c5227f8d7bf51498cada63f583 (diff)
downloadgdb-1e8766d7c9c6cfa35b4c057998fa7f31f6c3b450.zip
gdb-1e8766d7c9c6cfa35b4c057998fa7f31f6c3b450.tar.gz
gdb-1e8766d7c9c6cfa35b4c057998fa7f31f6c3b450.tar.bz2
2010-11-25 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/tc-s390.c (current_cpu): Initialize with latest CPU. (init_default_arch): Default to z/Architecture mode if CPU provides it. Remove the check setting the CPU default. 2010-11-25 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> * opcode/s390.h (enum s390_opcode_cpu_val): Add S390_OPCODE_MAXCPU.
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-s390.c15
-rw-r--r--include/ChangeLog4
-rw-r--r--include/opcode/s390.h3
4 files changed, 18 insertions, 10 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index fcce43c..60cb1b0 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-25 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * config/tc-s390.c (current_cpu): Initialize with latest CPU.
+ (init_default_arch): Default to z/Architecture mode if CPU provides it.
+ Remove the check setting the CPU default.
+
2010-11-25 Alan Modra <amodra@gmail.com>
* po/es.po: Update.
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c
index 273ddd6..ca7ad3b 100644
--- a/gas/config/tc-s390.c
+++ b/gas/config/tc-s390.c
@@ -38,8 +38,11 @@ static char *default_arch = DEFAULT_ARCH;
/* Either 32 or 64, selects file format. */
static int s390_arch_size = 0;
+/* If no -march option was given default to the highest available CPU.
+ Since with S/390 a newer CPU always supports everything from its
+ predecessors this will accept every valid asm input. */
+static unsigned int current_cpu = S390_OPCODE_MAXCPU - 1;
static unsigned int current_mode_mask = 0;
-static unsigned int current_cpu = -1U;
/* Whether to use user friendly register names. Default is TRUE. */
#ifndef TARGET_REG_NAMES_P
@@ -328,18 +331,12 @@ init_default_arch (void)
if (current_mode_mask == 0)
{
- if (s390_arch_size == 32)
+ /* Default to z/Architecture mode if the CPU supports it. */
+ if (current_cpu < S390_OPCODE_Z900)
current_mode_mask = 1 << S390_OPCODE_ESA;
else
current_mode_mask = 1 << S390_OPCODE_ZARCH;
}
- if (current_cpu == -1U)
- {
- if (current_mode_mask == (1 << S390_OPCODE_ESA))
- current_cpu = S390_OPCODE_G5;
- else
- current_cpu = S390_OPCODE_Z900;
- }
}
/* Called by TARGET_FORMAT. */
diff --git a/include/ChangeLog b/include/ChangeLog
index bcaf5f2..1cff893 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2010-11-25 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * opcode/s390.h (enum s390_opcode_cpu_val): Add S390_OPCODE_MAXCPU.
+
2010-11-16 Ian Lance Taylor <iant@google.com>
* simple-object.h (simple_object_attributes_merge): Declare,
diff --git a/include/opcode/s390.h b/include/opcode/s390.h
index 399904c..2cbe5f5 100644
--- a/include/opcode/s390.h
+++ b/include/opcode/s390.h
@@ -39,7 +39,8 @@ enum s390_opcode_cpu_val
S390_OPCODE_Z9_109,
S390_OPCODE_Z9_EC,
S390_OPCODE_Z10,
- S390_OPCODE_Z196
+ S390_OPCODE_Z196,
+ S390_OPCODE_MAXCPU
};
/* The opcode table is an array of struct s390_opcode. */