aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1997-09-20 22:46:30 +0000
committerNick Clifton <nickc@redhat.com>1997-09-20 22:46:30 +0000
commit03c41a1cf336d635602187b0792ab0f224e68efb (patch)
treecc5acaae87d46a9da33ea0b6cc45ff89118735f9
parentc476ac55601cb83d48fe31e0b075ac8c8ee2cbc5 (diff)
downloadgdb-03c41a1cf336d635602187b0792ab0f224e68efb.zip
gdb-03c41a1cf336d635602187b0792ab0f224e68efb.tar.gz
gdb-03c41a1cf336d635602187b0792ab0f224e68efb.tar.bz2
Remove use of sanitization to select target CPU. This is now done based
on the contents of the configuration string TARGET_CPU.
-rw-r--r--gas/config/tc-v850.c40
1 files changed, 36 insertions, 4 deletions
diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c
index 724030b..0e14e8e 100644
--- a/gas/config/tc-v850.c
+++ b/gas/config/tc-v850.c
@@ -35,10 +35,10 @@ static boolean warn_signed_overflows = FALSE;
static boolean warn_unsigned_overflows = FALSE;
/* Indicates the target BFD machine number. */
-static int machine = TARGET_MACHINE;
+static int machine = -1;
/* Indicates the target processor(s) for the assemble. */
-static unsigned int processor_mask = TARGET_PROCESSOR;
+static unsigned int processor_mask = -1;
/* Structure to hold information about predefined registers. */
@@ -861,7 +861,6 @@ md_parse_option (c, arg)
{
machine = bfd_mach_v850e;
processor_mask = PROCESSOR_V850E;
-
return 1;
}
/* end-sanitize-v850e */
@@ -982,7 +981,40 @@ md_begin ()
register const struct v850_opcode * op;
flagword applicable;
-
+/* start-sanitize-v850eq */
+ if (strncmp (TARGET_CPU, "v850eq", 6) == 0)
+ {
+ if (machine == -1)
+ machine = bfd_mach_v850eq;
+
+ if (processor_mask == -1)
+ processor_mask = PROCESSOR_V850EQ;
+ }
+ else
+/* end-sanitize-v850eq */
+/* start-sanitize-v850e */
+ if (strncmp (TARGET_CPU, "v850e", 5) == 0)
+ {
+ if (machine == -1)
+ machine = bfd_mach_v850e;
+
+ if (processor_mask == -1)
+ processor_mask = PROCESSOR_V850E;
+ }
+ else
+/* end-sanitize-v850e */
+ if (strncmp (TARGET_CPU, "v850", 4) == 0)
+ {
+ if (machine == -1)
+ machine = 0;
+
+ if (processor_mask == -1)
+ processor_mask = PROCESSOR_V850;
+ }
+ else
+ as_bad ("Unable to determine default target processor from string: %s",
+ TARGET_CPU);
+
v850_hash = hash_new();
/* Insert unique names into hash table. The V850 instruction set