Add support for cgen machine determination.
authorPatrick Macdonald <patrickm@redhat.com>
Tue, 20 Mar 2001 20:56:34 +0000 (20:56 +0000)
committerPatrick Macdonald <patrickm@redhat.com>
Tue, 20 Mar 2001 20:56:34 +0000 (20:56 +0000)
        * cgen-dis.in (print_insn_@arch@): Add support for target machine
        determination via CGEN_COMPUTE_MACH.
        * fr30-desc.c: Regenerate.
        * fr30-dis.c: Regenerate.
        * fr30-opc.h: Regenerate.
        * m32r-desc.c: Regenerate.
        * m32r-dis.c: Regenerate.
        * m32r-opc.h: Regenerate.
        * m32r-opinst.c: Regenerate.

opcodes/ChangeLog
opcodes/cgen-dis.in
opcodes/fr30-desc.c
opcodes/fr30-dis.c
opcodes/fr30-opc.h
opcodes/m32r-desc.c
opcodes/m32r-dis.c
opcodes/m32r-opc.h
opcodes/m32r-opinst.c

index dda0f0dbaefb1f358d3f687d56dc339ecb1d048c..692a029c4a0cc2c0fc8742328034b0ba42b90fe1 100644 (file)
@@ -1,3 +1,15 @@
+2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
+
+        * cgen-dis.in (print_insn_@arch@): Add support for target machine
+        determination via CGEN_COMPUTE_MACH.
+       * fr30-desc.c: Regenerate.
+       * fr30-dis.c: Regenerate.
+       * fr30-opc.h: Regenerate.
+       * m32r-desc.c: Regenerate.
+       * m32r-dis.c: Regenerate.
+       * m32r-opc.h: Regenerate.
+       * m32r-opinst.c: Regenerate.
+
 2001-03-20  H.J. Lu  <hjl@gnu.org>
 
        * configure.in: Remove the redundent AC_ARG_PROGRAM.
index 0e7c35a5675ae176a0105b0b166cbfbd80cc3a09..1cb8ea372f7580ec699d03a6f1b1eaa3b922fc8a 100644 (file)
@@ -358,17 +358,21 @@ print_insn_@arch@ (pc, info)
   arch = info->arch;
   if (arch == bfd_arch_unknown)
     arch = CGEN_BFD_ARCH;
-      
-  /* There's no standard way to compute the isa number (e.g. for arm thumb)
+   
+  /* There's no standard way to compute the machine or isa number
      so we leave it to the target.  */
+#ifdef CGEN_COMPUTE_MACH
+  mach = CGEN_COMPUTE_MACH (info);
+#else
+  mach = info->mach;
+#endif
+
 #ifdef CGEN_COMPUTE_ISA
   isa = CGEN_COMPUTE_ISA (info);
 #else
   isa = 0;
 #endif
 
-  mach = info->mach;
-
   /* If we've switched cpu's, close the current table and open a new one.  */
   if (cd
       && (isa != prev_isa
index 00c37001299087817e2a0c7f175961d6aaf12371..4223833f62252252a5efb4fcadfa557b7d1d4afb 100644 (file)
@@ -1600,7 +1600,7 @@ fr30_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
            const CGEN_MACH *mach =
              lookup_mach_via_bfd_name (fr30_cgen_mach_table, name);
 
-           machs |= mach->num << 1;
+           machs |= 1 << mach->num;
            break;
          }
        case CGEN_CPU_OPEN_ENDIAN :
index e75944de8fdd4218151466c0d69affd7770d331c..f389dcc1edbbae1916622b9a9554ea140dfe9c1a 100644 (file)
@@ -624,17 +624,21 @@ print_insn_fr30 (pc, info)
   arch = info->arch;
   if (arch == bfd_arch_unknown)
     arch = CGEN_BFD_ARCH;
-      
-  /* There's no standard way to compute the isa number (e.g. for arm thumb)
+   
+  /* There's no standard way to compute the machine or isa number
      so we leave it to the target.  */
+#ifdef CGEN_COMPUTE_MACH
+  mach = CGEN_COMPUTE_MACH (info);
+#else
+  mach = info->mach;
+#endif
+
 #ifdef CGEN_COMPUTE_ISA
   isa = CGEN_COMPUTE_ISA (info);
 #else
   isa = 0;
 #endif
 
-  mach = info->mach;
-
   /* If we've switched cpu's, close the current table and open a new one.  */
   if (cd
       && (isa != prev_isa
index 33d3094efbd7329e175cd4c88df826ccf1c4482c..623501dbd8fd7f2ec345939427088cd939309d54 100644 (file)
@@ -77,14 +77,14 @@ typedef enum cgen_insn_type {
  , FR30_INSN_ORCCR, FR30_INSN_STILM, FR30_INSN_ADDSP, FR30_INSN_EXTSB
  , FR30_INSN_EXTUB, FR30_INSN_EXTSH, FR30_INSN_EXTUH, FR30_INSN_LDM0
  , FR30_INSN_LDM1, FR30_INSN_STM0, FR30_INSN_STM1, FR30_INSN_ENTER
- , FR30_INSN_LEAVE, FR30_INSN_XCHB, FR30_INSN_MAX
+ , FR30_INSN_LEAVE, FR30_INSN_XCHB
 } CGEN_INSN_TYPE;
 
 /* Index of `invalid' insn place holder.  */
 #define CGEN_INSN_INVALID FR30_INSN_INVALID
 
 /* Total number of insns in table.  */
-#define MAX_INSNS ((int) FR30_INSN_MAX)
+#define MAX_INSNS ((int) FR30_INSN_XCHB + 1)
 
 /* This struct records data prior to insertion or after extraction.  */
 struct cgen_fields
index 111eb2d9a0fcba8ae16e26d7defddf0bf2b2e898..8bcd79047982ab5ac8b327b7fad82b03ac197b03 100644 (file)
@@ -1324,7 +1324,7 @@ m32r_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
            const CGEN_MACH *mach =
              lookup_mach_via_bfd_name (m32r_cgen_mach_table, name);
 
-           machs |= mach->num << 1;
+           machs |= 1 << mach->num;
            break;
          }
        case CGEN_CPU_OPEN_ENDIAN :
index 8ffce7c788956def8cbf0d4f7427577acc4ff837..7164a40cf5c27760f1f2dbbbf76ee05ef6b87b4e 100644 (file)
@@ -563,17 +563,21 @@ print_insn_m32r (pc, info)
   arch = info->arch;
   if (arch == bfd_arch_unknown)
     arch = CGEN_BFD_ARCH;
-      
-  /* There's no standard way to compute the isa number (e.g. for arm thumb)
+   
+  /* There's no standard way to compute the machine or isa number
      so we leave it to the target.  */
+#ifdef CGEN_COMPUTE_MACH
+  mach = CGEN_COMPUTE_MACH (info);
+#else
+  mach = info->mach;
+#endif
+
 #ifdef CGEN_COMPUTE_ISA
   isa = CGEN_COMPUTE_ISA (info);
 #else
   isa = 0;
 #endif
 
-  mach = info->mach;
-
   /* If we've switched cpu's, close the current table and open a new one.  */
   if (cd
       && (isa != prev_isa
index 68fad09f61f2b0d49305a837a5116f96d9128217..f3eb13933ae7604566f90ec734ac505f611f72e5 100644 (file)
@@ -74,14 +74,14 @@ typedef enum cgen_insn_type {
  , M32R_INSN_SUBV, M32R_INSN_SUBX, M32R_INSN_TRAP, M32R_INSN_UNLOCK
  , M32R_INSN_SATB, M32R_INSN_SATH, M32R_INSN_SAT, M32R_INSN_PCMPBZ
  , M32R_INSN_SADD, M32R_INSN_MACWU1, M32R_INSN_MSBLO, M32R_INSN_MULWU1
- , M32R_INSN_MACLH1, M32R_INSN_SC, M32R_INSN_SNC, M32R_INSN_MAX
+ , M32R_INSN_MACLH1, M32R_INSN_SC, M32R_INSN_SNC
 } CGEN_INSN_TYPE;
 
 /* Index of `invalid' insn place holder.  */
 #define CGEN_INSN_INVALID M32R_INSN_INVALID
 
 /* Total number of insns in table.  */
-#define MAX_INSNS ((int) M32R_INSN_MAX)
+#define MAX_INSNS ((int) M32R_INSN_SNC + 1)
 
 /* This struct records data prior to insertion or after extraction.  */
 struct cgen_fields
index 5dbcd12aff7c1493e164eeea1631e8f6d04a9b28..55e7e4fed44d7e85f7ee6032276f7223fb079396 100644 (file)
@@ -2,7 +2,7 @@
 
 THIS FILE IS MACHINE GENERATED WITH CGEN.
 
-Copyright 1996, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
 This file is part of the GNU Binutils and/or GDB, the GNU debugger.
 
This page took 0.031443 seconds and 4 git commands to generate.