]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add support for maxq10 and maxq20 machine values
authorNick Clifton <nickc@redhat.com>
Mon, 10 Jan 2005 16:33:51 +0000 (16:33 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 10 Jan 2005 16:33:51 +0000 (16:33 +0000)
bfd/ChangeLog
bfd/archures.c
bfd/bfd-in2.h
bfd/coffcode.h
bfd/cpu-maxq.c
gas/ChangeLog
gas/config/tc-maxq.c
include/coff/ChangeLog
include/coff/maxq.h

index 1cff339560fc2dd1789ae0807541c3c9e257c8e4..92ca82b8e9fb2910fae479f3a7f3fc49fe2b413d 100644 (file)
@@ -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
index b7fa3bc65863d21c15d01338351f180a5174d8da..af25ef626db037ec652df3a96356a4ff16adfa7e 100644 (file)
@@ -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
 .  };
 */
index bc497ca6f3db2b8cf5e9fad0a19219a77d45d634..fe4116149cf27e52955019e669d6f0ddadc6e62e 100644 (file)
@@ -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
   };
 
index 63a2c639b68cdd7da6edb7df5967fa966a176721..30560aa8148e970b6d70660c57bc1a39149ec072 100644 (file)
@@ -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.  */
index 9c36a161804edc402f9e9630a6150a193cfc4f52..bec43ea221da807e5a41a97a0fd8e4b21271ad48 100644 (file)
@@ -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)           
 #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
+};
index ceea7de131e8c97e9af93f9706471c33c3354bce..5e410703b8e4b4fb8497019c77fbcc942bd01999 100644 (file)
@@ -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.
index e467e048f5f008ffb4dda030e7aea9adee383b3d..43784c9c330da13fc821487dc1132b1cab62141b 100644 (file)
@@ -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
index 533e59b07a766cd85ef507229766058aa6c19f7f..3d2c66d4e391904e0f96b2316a6ce2278c380cd5 100644 (file)
@@ -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>
 
index a7be9cb1ed7ad945323b1431a7d21a8fb75a9861..694a3fa63ad865574679affe48ce698ed6ffb719 100644 (file)
@@ -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 
 
 /* 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))