aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-01-10 16:33:51 +0000
committerNick Clifton <nickc@redhat.com>2005-01-10 16:33:51 +0000
commit5c4504f7c53c30ac373de048662365885bd51cb5 (patch)
tree3e971d44cb8e354482fd78db3f27e03ac6088c06
parentb702665739598ec762119fda6dec4a09adc48fc0 (diff)
downloadgdb-5c4504f7c53c30ac373de048662365885bd51cb5.zip
gdb-5c4504f7c53c30ac373de048662365885bd51cb5.tar.gz
gdb-5c4504f7c53c30ac373de048662365885bd51cb5.tar.bz2
Add support for maxq10 and maxq20 machine values
-rw-r--r--bfd/ChangeLog10
-rw-r--r--bfd/archures.c4
-rw-r--r--bfd/bfd-in2.h2
-rw-r--r--bfd/coffcode.h27
-rw-r--r--bfd/cpu-maxq.c41
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-maxq.c29
-rw-r--r--include/coff/ChangeLog6
-rw-r--r--include/coff/maxq.h11
9 files changed, 107 insertions, 30 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 1cff339..92ca82b 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,13 @@
+2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
+
+ * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
+ * bfd-in2.h: Regenerate.
+ * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
+ to support these new machine values.
+ * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
+ the maxq10.
+ (bfd_maxq_arch): Update values for the maxq20.
+
2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
* elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
diff --git a/bfd/archures.c b/bfd/archures.c
index b7fa3bc..af25ef6 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -1,6 +1,6 @@
/* BFD library support routines for architectures.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004
+ 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
@@ -356,6 +356,8 @@ DESCRIPTION
. bfd_arch_xtensa, {* Tensilica's Xtensa cores. *}
.#define bfd_mach_xtensa 1
. bfd_arch_maxq, {* Dallas MAXQ 10/20 *}
+.#define bfd_mach_maxq10 10
+.#define bfd_mach_maxq20 20
. bfd_arch_last
. };
*/
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index bc497ca..fe41161 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1808,6 +1808,8 @@ enum bfd_architecture
bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
#define bfd_mach_xtensa 1
bfd_arch_maxq, /* Dallas MAXQ 10/20 */
+#define bfd_mach_maxq10 10
+#define bfd_mach_maxq20 20
bfd_arch_last
};
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 63a2c63..30560aa 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -1989,7 +1989,17 @@ coff_set_arch_mach_hook (abfd, filehdr)
#ifdef MAXQ20MAGIC
case MAXQ20MAGIC:
arch = bfd_arch_maxq;
- machine = 0;
+ switch (internal_f->f_flags & F_MACHMASK)
+ {
+ case F_MAXQ10:
+ machine = bfd_mach_maxq10;
+ break;
+ case F_MAXQ20:
+ machine = bfd_mach_maxq20;
+ break;
+ default:
+ return FALSE;
+ }
break;
#endif
#ifdef MC88MAGIC
@@ -2927,9 +2937,18 @@ coff_set_flags (abfd, magicp, flagsp)
#ifdef MAXQ20MAGIC
case bfd_arch_maxq:
- *magicp = MAXQ20MAGIC;
- return TRUE;
- break;
+ * magicp = MAXQ20MAGIC;
+ switch (bfd_get_mach (abfd))
+ {
+ case bfd_mach_maxq10:
+ * flagsp = F_MAXQ10;
+ return TRUE;
+ case bfd_mach_maxq20:
+ * flagsp = F_MAXQ20;
+ return TRUE;
+ default:
+ return FALSE;
+ }
#endif
default: /* Unknown architecture. */
diff --git a/bfd/cpu-maxq.c b/bfd/cpu-maxq.c
index 9c36a16..bec43ea 100644
--- a/bfd/cpu-maxq.c
+++ b/bfd/cpu-maxq.c
@@ -1,5 +1,5 @@
/* BFD support for the MAXQ20/10 architecture.
- Copyright 2004 Free Software Foundation, Inc.
+ Copyright 2004, 2005 Free Software Foundation, Inc.
Written by Vineet Sharma(vineets@noida.hcltech.com)
Inderpreet Singh(inderpreetb@noida.hcltech.com)
@@ -25,18 +25,35 @@
#include "libbfd.h"
/* MAXQ Archtecture info. */
-const bfd_arch_info_type bfd_maxq_arch =
+static const bfd_arch_info_type bfd_maxq10_arch =
{
- 16, /* 16 bits in a word */
- 16, /* 16 bits in an address */
- 8, /* 16 bits in a byte */
- bfd_arch_maxq, /* enum bfd_archtecture arch */
- 0, /* only 1 machine */
- "maxq", /* arch_name */
- "maxq", /* printable name */
- 0, /* section align power */
- TRUE, /* the_default: if this is the machine */
- bfd_default_compatible, /* bfd_arch_info */
+ 16, /* 16 bits in a word. */
+ 16, /* 16 bits in an address. */
+ 8, /* 16 bits in a byte. */
+ bfd_arch_maxq, /* Architecture number. */
+ bfd_mach_maxq10, /* Machine number. */
+ "maxq", /* Architecture name. */
+ "maxq10", /* Machine name. */
+ 0, /* Section align power. */
+ FALSE, /* Not the default machine. */
+ bfd_default_compatible,
bfd_default_scan,
NULL
};
+
+
+const bfd_arch_info_type bfd_maxq_arch =
+{
+ 16, /* 16 bits in a word. */
+ 16, /* 16 bits in an address. */
+ 8, /* 16 bits in a byte. */
+ bfd_arch_maxq, /* Architecture number. */
+ bfd_mach_maxq20, /* Machine number. */
+ "maxq", /* Architecture name. */
+ "maxq20", /* Machine name. */
+ 0, /* Section align power. */
+ TRUE, /* This is the default machine. */
+ bfd_default_compatible,
+ bfd_default_scan,
+ & bfd_maxq10_arch
+};
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ceea7de..5e41070 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
+
+ * tc-maxq.c: Replace constants 10 and 20 with bfd_mach_maxq10 and
+ bfd_mach_maxq20.
+ (md_pseudo_table): Add new pseudo ops for maxq10 and maxq20.
+ (maxq_target): New function: Set the machine type.
+
2005-01-06 Paul Brook <paul@codesourcery.com>
* config/tc-arm.c (FPU_DEFAULT): Define for TE_VXWORKS.
diff --git a/gas/config/tc-maxq.c b/gas/config/tc-maxq.c
index e467e04..43784c9 100644
--- a/gas/config/tc-maxq.c
+++ b/gas/config/tc-maxq.c
@@ -1,6 +1,6 @@
/* tc-maxq.c -- assembler code for a MAXQ chip.
- Copyright 2004 Free Software Foundation, Inc.
+ Copyright 2004, 2005 Free Software Foundation, Inc.
Contributed by HCL Technologies Pvt. Ltd.
@@ -70,7 +70,7 @@
#define PFX0 0x0b
/* Set default to MAXQ20. */
-unsigned int max_version = 20;
+unsigned int max_version = bfd_mach_maxq20;
const char *default_arch = DEFAULT_ARCH;
@@ -186,6 +186,13 @@ md_undefined_symbol (char * name ATTRIBUTE_UNUSED)
return NULL;
}
+static void
+maxq_target (int target)
+{
+ max_version = target;
+ bfd_set_arch_mach (stdoutput, bfd_arch_maxq, max_version);
+}
+
int
md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
{
@@ -193,10 +200,10 @@ md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
switch (c)
{
case MAXQ_10:
- max_version = 10;
+ max_version = bfd_mach_maxq10;
break;
case MAXQ_20:
- max_version = 20;
+ max_version = bfd_mach_maxq20;
break;
default:
@@ -717,6 +724,8 @@ const pseudo_typeS md_pseudo_table[] =
{
{"int", cons, 2}, /* size of 'int' has been changed to 1 word
(i.e) 16 bits. */
+ {"maxq10", maxq_target, bfd_mach_maxq10},
+ {"maxq20", maxq_target, bfd_mach_maxq20},
{NULL, 0, 0},
};
@@ -2948,7 +2957,7 @@ md_begin (void)
core_optab->end = optab;
#ifdef MAXQ10S
- if (max_version == 10)
+ if (max_version == bfd_mach_maxq10)
{
if (((optab - 1)->arch == MAXQ10) || ((optab - 1)->arch == MAX))
{
@@ -2957,9 +2966,8 @@ md_begin (void)
(PTR) core_optab);
}
}
- else if (max_version == 20)
+ else if (max_version == bfd_mach_maxq20)
{
- /* MAXQ20 */
if (((optab - 1)->arch == MAXQ20) || ((optab - 1)->arch == MAX))
{
#endif
@@ -2993,12 +3001,12 @@ md_begin (void)
#if MAXQ10S
switch (max_version)
{
- case 10: /* MAXQ10 */
+ case bfd_mach_maxq10:
if ((reg_tab->arch == MAXQ10) || (reg_tab->arch == MAX))
hash_err = hash_insert (reg_hash, reg_tab->reg_name, (PTR) reg_tab);
break;
- case 20: /* MAXQ20 */
+ case bfd_mach_maxq20:
if ((reg_tab->arch == MAXQ20) || (reg_tab->arch == MAX))
{
#endif
@@ -3116,6 +3124,9 @@ md_begin (void)
for (p = operand_special_chars; *p != '\0'; p++)
operand_chars[(unsigned char) *p] = (unsigned char) *p;
+
+ /* Set the maxq arch type. */
+ maxq_target (max_version);
}
/* md_assemble - Parse Instr - Seprate menmonics and operands - lookup the
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog
index 533e59b..3d2c66d 100644
--- a/include/coff/ChangeLog
+++ b/include/coff/ChangeLog
@@ -1,7 +1,11 @@
+2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
+
+ * maxq.h (F_MAXQ10, F_MAXQ20): Define.
+
2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
Vineet Sharma <vineets@noida.hcltech.com>
- * maxqh: New file: Defintions for the maxq port.
+ * maxq.h: New file: Defintions for the maxq port.
2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
diff --git a/include/coff/maxq.h b/include/coff/maxq.h
index a7be9cb..694a3fa 100644
--- a/include/coff/maxq.h
+++ b/include/coff/maxq.h
@@ -1,6 +1,6 @@
/* COFF spec for MAXQ
- Copyright 2004 Free Software Foundation, Inc.
+ Copyright 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
@@ -25,14 +25,19 @@
/* Bits for f_flags: F_RELFLG relocation info stripped from file F_EXEC file
is executable (no unresolved external references) F_LNNO line numbers
- stripped from file F_LSYMS local symbols stripped from file F_AR32WR file
- has byte ordering of an AR32WR machine (e.g. vax). */
+ stripped from file F_LSYMS local symbols stripped from file. */
#define F_RELFLG (0x0001)
#define F_EXEC (0x0002)
#define F_LNNO (0x0004)
#define F_LSYMS (0x0008)
+/* Variant Specific Flags for MAXQ10 and MAXQ20. */
+#define F_MAXQ10 (0x0030)
+#define F_MAXQ20 (0x0040)
+
+#define F_MACHMASK (0x00F0)
+
/* Magic numbers for maxq. */
#define MAXQ20MAGIC 0xa0
#define MAXQ20BADMAG(x) (((x).f_magic != MAXQ20MAGIC))