* cgen-dis.in (print_normal): Delete CGEN_PRINT_NORMAL.
authorDoug Evans <dje@google.com>
Fri, 12 Feb 2010 04:42:28 +0000 (04:42 +0000)
committerDoug Evans <dje@google.com>
Fri, 12 Feb 2010 04:42:28 +0000 (04:42 +0000)
(print_address): Delete CGEN_PRINT_ADDRESS.
* fr30-dis.c, * frv-dis.c, * ip2k-dis.c, * iq2000-dis.c,
* lm32-dis.c, * m32c-dis.c, * m32r-desc.c, * m32r-desc.h,
* m32r-dis.c, * mep-dis.c, * mt-dis.c, * openrisc-dis.c,
* xc16x-dis.c, * xstormy16-dis.c: Regenerate.

16 files changed:
opcodes/ChangeLog
opcodes/cgen-dis.in
opcodes/fr30-dis.c
opcodes/frv-dis.c
opcodes/ip2k-dis.c
opcodes/iq2000-dis.c
opcodes/lm32-dis.c
opcodes/m32c-dis.c
opcodes/m32r-desc.c
opcodes/m32r-desc.h
opcodes/m32r-dis.c
opcodes/mep-dis.c
opcodes/mt-dis.c
opcodes/openrisc-dis.c
opcodes/xc16x-dis.c
opcodes/xstormy16-dis.c

index 06d1cd80d244e5ba9986a61437b585adc70f53a7..5253c3325e049c25ea095a7a73eb387f8b651754 100644 (file)
@@ -1,5 +1,12 @@
 2010-02-11  Doug Evans  <dje@sebabeach.org>
 
+       * cgen-dis.in (print_normal): Delete CGEN_PRINT_NORMAL.
+       (print_address): Delete CGEN_PRINT_ADDRESS.
+       * fr30-dis.c, * frv-dis.c, * ip2k-dis.c, * iq2000-dis.c,
+       * lm32-dis.c, * m32c-dis.c, * m32r-desc.c, * m32r-desc.h,
+       * m32r-dis.c, * mep-dis.c, * mt-dis.c, * openrisc-dis.c,
+       * xc16x-dis.c, * xstormy16-dis.c: Regenerate.
+
        * fr30-desc.c, * fr30-desc.h, * fr30-opc.c,
        * frv-desc.c, * frv-desc.h, * frv-opc.c,
        * ip2k-desc.c, * ip2k-desc.h, * ip2k-opc.c,
index 5b3617d2c9dad4d6bad667f95a3cac4413169147..0941853916fc6d626b1151cfcb53dd9e186e993c 100644 (file)
@@ -70,10 +70,6 @@ print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_NORMAL
-  CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* nothing to do */
@@ -95,10 +91,6 @@ print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_ADDRESS
-  CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* Nothing to do.  */
index d10f58c6c15bea9fb679d183a9693ae4e302b9d7..d998dac3d42f97319e69da1f601eff44b13476a0 100644 (file)
@@ -330,10 +330,6 @@ print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_NORMAL
-  CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* nothing to do */
@@ -355,10 +351,6 @@ print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_ADDRESS
-  CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* Nothing to do.  */
index c90f823c4e285e4ceff1eac4c193a670532a77ca..ff9a57d203058f259f4975bbd828cf8f849ef116 100644 (file)
@@ -427,10 +427,6 @@ print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_NORMAL
-  CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* nothing to do */
@@ -452,10 +448,6 @@ print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_ADDRESS
-  CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* Nothing to do.  */
index c9b87816acbec5fa14185f6a35b966f0e48aa707..10d94da1b690b5dc5162eb094161ba3a1ae1ca13 100644 (file)
@@ -319,10 +319,6 @@ print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_NORMAL
-  CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* nothing to do */
@@ -344,10 +340,6 @@ print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_ADDRESS
-  CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* Nothing to do.  */
index 788b8d34dd09a60fe38257f979451b38bac89855..a4f27fadb92193819a7c383b1603819a5d6bf074 100644 (file)
@@ -220,10 +220,6 @@ print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_NORMAL
-  CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* nothing to do */
@@ -245,10 +241,6 @@ print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_ADDRESS
-  CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* Nothing to do.  */
index e30af57b7e36472e2cb3d328bd7c9b28558e79ef..884a572525c3f8cb00252c7d04950570182275c1 100644 (file)
@@ -178,10 +178,6 @@ print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_NORMAL
-  CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* nothing to do */
@@ -203,10 +199,6 @@ print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_ADDRESS
-  CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* Nothing to do.  */
index 188d51b736e7e30bb464fe0d0e434da90fb5d221..728333327e4e4df8976c9c261ae0b44cc0584ed6 100644 (file)
@@ -922,10 +922,6 @@ print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_NORMAL
-  CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* nothing to do */
@@ -947,10 +943,6 @@ print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_ADDRESS
-  CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* Nothing to do.  */
index 0aa757f82a866ad00746fff01edb1506d3970964..599cc9f8a599ba4e1954f4b28a8680d1fd507ff7 100644 (file)
@@ -105,7 +105,6 @@ const CGEN_ATTR_TABLE m32r_cgen_operand_attr_table[] =
   { "RELAX", &bool_attr[0], &bool_attr[0] },
   { "SEM-ONLY", &bool_attr[0], &bool_attr[0] },
   { "RELOC", &bool_attr[0], &bool_attr[0] },
-  { "HASH-PREFIX", &bool_attr[0], &bool_attr[0] },
   { 0, 0, 0 }
 };
 
@@ -342,35 +341,35 @@ const CGEN_OPERAND m32r_cgen_operand_table[] =
 /* simm8: 8 bit signed immediate */
   { "simm8", M32R_OPERAND_SIMM8, HW_H_SINT, 8, 8,
     { 0, { (const PTR) &m32r_cgen_ifld_table[M32R_F_SIMM8] } }, 
-    { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } }  },
+    { 0, { { { (1<<MACH_BASE), 0 } } } }  },
 /* simm16: 16 bit signed immediate */
   { "simm16", M32R_OPERAND_SIMM16, HW_H_SINT, 16, 16,
     { 0, { (const PTR) &m32r_cgen_ifld_table[M32R_F_SIMM16] } }, 
-    { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } }  },
+    { 0, { { { (1<<MACH_BASE), 0 } } } }  },
 /* uimm3: 3 bit unsigned number */
   { "uimm3", M32R_OPERAND_UIMM3, HW_H_UINT, 5, 3,
     { 0, { (const PTR) &m32r_cgen_ifld_table[M32R_F_UIMM3] } }, 
-    { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } }  },
+    { 0, { { { (1<<MACH_BASE), 0 } } } }  },
 /* uimm4: 4 bit trap number */
   { "uimm4", M32R_OPERAND_UIMM4, HW_H_UINT, 12, 4,
     { 0, { (const PTR) &m32r_cgen_ifld_table[M32R_F_UIMM4] } }, 
-    { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } }  },
+    { 0, { { { (1<<MACH_BASE), 0 } } } }  },
 /* uimm5: 5 bit shift count */
   { "uimm5", M32R_OPERAND_UIMM5, HW_H_UINT, 11, 5,
     { 0, { (const PTR) &m32r_cgen_ifld_table[M32R_F_UIMM5] } }, 
-    { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } }  },
+    { 0, { { { (1<<MACH_BASE), 0 } } } }  },
 /* uimm8: 8 bit unsigned immediate */
   { "uimm8", M32R_OPERAND_UIMM8, HW_H_UINT, 8, 8,
     { 0, { (const PTR) &m32r_cgen_ifld_table[M32R_F_UIMM8] } }, 
-    { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } }  },
+    { 0, { { { (1<<MACH_BASE), 0 } } } }  },
 /* uimm16: 16 bit unsigned immediate */
   { "uimm16", M32R_OPERAND_UIMM16, HW_H_UINT, 16, 16,
     { 0, { (const PTR) &m32r_cgen_ifld_table[M32R_F_UIMM16] } }, 
-    { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } }  },
+    { 0, { { { (1<<MACH_BASE), 0 } } } }  },
 /* imm1: 1 bit immediate */
   { "imm1", M32R_OPERAND_IMM1, HW_H_UINT, 15, 1,
     { 0, { (const PTR) &m32r_cgen_ifld_table[M32R_F_IMM1] } }, 
-    { 0|A(HASH_PREFIX), { { { (1<<MACH_M32RX)|(1<<MACH_M32R2), 0 } } } }  },
+    { 0, { { { (1<<MACH_M32RX)|(1<<MACH_M32R2), 0 } } } }  },
 /* accd: accumulator destination register */
   { "accd", M32R_OPERAND_ACCD, HW_H_ACCUMS, 4, 2,
     { 0, { (const PTR) &m32r_cgen_ifld_table[M32R_F_ACCD] } }, 
@@ -402,7 +401,7 @@ const CGEN_OPERAND m32r_cgen_operand_table[] =
 /* uimm24: 24 bit address */
   { "uimm24", M32R_OPERAND_UIMM24, HW_H_ADDR, 8, 24,
     { 0, { (const PTR) &m32r_cgen_ifld_table[M32R_F_UIMM24] } }, 
-    { 0|A(HASH_PREFIX)|A(RELOC)|A(ABS_ADDR), { { { (1<<MACH_BASE), 0 } } } }  },
+    { 0|A(RELOC)|A(ABS_ADDR), { { { (1<<MACH_BASE), 0 } } } }  },
 /* disp8: 8 bit displacement */
   { "disp8", M32R_OPERAND_DISP8, HW_H_IADDR, 8, 8,
     { 0, { (const PTR) &m32r_cgen_ifld_table[M32R_F_DISP8] } }, 
index ac3595887850321e1762c02202eb9ca2b006750d..38abf106316a9ec4f087b9e5ea3317b3b02a6c2e 100644 (file)
@@ -190,8 +190,8 @@ typedef enum cgen_hw_type {
 typedef enum cgen_operand_attr {
   CGEN_OPERAND_VIRTUAL, CGEN_OPERAND_PCREL_ADDR, CGEN_OPERAND_ABS_ADDR, CGEN_OPERAND_SIGN_OPT
  , CGEN_OPERAND_SIGNED, CGEN_OPERAND_NEGATIVE, CGEN_OPERAND_RELAX, CGEN_OPERAND_SEM_ONLY
- , CGEN_OPERAND_RELOC, CGEN_OPERAND_HASH_PREFIX, CGEN_OPERAND_END_BOOLS, CGEN_OPERAND_START_NBOOLS = 31
- , CGEN_OPERAND_MACH, CGEN_OPERAND_END_NBOOLS
+ , CGEN_OPERAND_RELOC, CGEN_OPERAND_END_BOOLS, CGEN_OPERAND_START_NBOOLS = 31, CGEN_OPERAND_MACH
+ , CGEN_OPERAND_END_NBOOLS
 } CGEN_OPERAND_ATTR;
 
 /* Number of non-boolean elements in cgen_operand_attr.  */
@@ -208,7 +208,6 @@ typedef enum cgen_operand_attr {
 #define CGEN_ATTR_CGEN_OPERAND_RELAX_VALUE(attrs) (((attrs)->bool & (1 << CGEN_OPERAND_RELAX)) != 0)
 #define CGEN_ATTR_CGEN_OPERAND_SEM_ONLY_VALUE(attrs) (((attrs)->bool & (1 << CGEN_OPERAND_SEM_ONLY)) != 0)
 #define CGEN_ATTR_CGEN_OPERAND_RELOC_VALUE(attrs) (((attrs)->bool & (1 << CGEN_OPERAND_RELOC)) != 0)
-#define CGEN_ATTR_CGEN_OPERAND_HASH_PREFIX_VALUE(attrs) (((attrs)->bool & (1 << CGEN_OPERAND_HASH_PREFIX)) != 0)
 
 /* Enum declaration for m32r operand types.  */
 typedef enum cgen_operand_type {
index 4e008dce786eac646365ab028fb615ac9e268792..25b4127524e05f90a1fd66e3049f17ed58eed88a 100644 (file)
@@ -59,15 +59,38 @@ static int read_insn
 /* -- disassembler routines inserted here.  */
 
 /* -- dis.c */
-/* Immediate values are prefixed with '#'.  */
 
-#define CGEN_PRINT_NORMAL(cd, info, value, attrs, pc, length)  \
-  do                                                           \
-    {                                                          \
-      if (CGEN_BOOL_ATTR ((attrs), CGEN_OPERAND_HASH_PREFIX))  \
-       (*info->fprintf_func) (info->stream, "#");              \
-    }                                                          \
-  while (0)
+/* Print signed operands with '#' prefixes.  */
+
+static void
+print_signed_with_hash_prefix (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+                              void * dis_info,
+                              long value,
+                              unsigned int attrs ATTRIBUTE_UNUSED,
+                              bfd_vma pc ATTRIBUTE_UNUSED,
+                              int length ATTRIBUTE_UNUSED)
+{
+  disassemble_info *info = (disassemble_info *) dis_info;
+
+  (*info->fprintf_func) (info->stream, "#");
+  (*info->fprintf_func) (info->stream, "%ld", value);
+}
+
+/* Print unsigned operands with '#' prefixes.  */
+
+static void
+print_unsigned_with_hash_prefix (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+                                void * dis_info,
+                                long value,
+                                unsigned int attrs ATTRIBUTE_UNUSED,
+                                bfd_vma pc ATTRIBUTE_UNUSED,
+                                int length ATTRIBUTE_UNUSED)
+{
+  disassemble_info *info = (disassemble_info *) dis_info;
+
+  (*info->fprintf_func) (info->stream, "#");
+  (*info->fprintf_func) (info->stream, "0x%lx", value);
+}
 
 /* Handle '#' prefixes as operands.  */
 
@@ -206,16 +229,16 @@ m32r_cgen_print_operand (CGEN_CPU_DESC cd,
       print_normal (cd, info, fields->f_hi16, 0|(1<<CGEN_OPERAND_SIGN_OPT), pc, length);
       break;
     case M32R_OPERAND_IMM1 :
-      print_normal (cd, info, fields->f_imm1, 0|(1<<CGEN_OPERAND_HASH_PREFIX), pc, length);
+      print_unsigned_with_hash_prefix (cd, info, fields->f_imm1, 0, pc, length);
       break;
     case M32R_OPERAND_SCR :
       print_keyword (cd, info, & m32r_cgen_opval_cr_names, fields->f_r2, 0);
       break;
     case M32R_OPERAND_SIMM16 :
-      print_normal (cd, info, fields->f_simm16, 0|(1<<CGEN_OPERAND_SIGNED)|(1<<CGEN_OPERAND_HASH_PREFIX), pc, length);
+      print_signed_with_hash_prefix (cd, info, fields->f_simm16, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
       break;
     case M32R_OPERAND_SIMM8 :
-      print_normal (cd, info, fields->f_simm8, 0|(1<<CGEN_OPERAND_SIGNED)|(1<<CGEN_OPERAND_HASH_PREFIX), pc, length);
+      print_signed_with_hash_prefix (cd, info, fields->f_simm8, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
       break;
     case M32R_OPERAND_SLO16 :
       print_normal (cd, info, fields->f_simm16, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
@@ -230,22 +253,22 @@ m32r_cgen_print_operand (CGEN_CPU_DESC cd,
       print_keyword (cd, info, & m32r_cgen_opval_gr_names, fields->f_r2, 0);
       break;
     case M32R_OPERAND_UIMM16 :
-      print_normal (cd, info, fields->f_uimm16, 0|(1<<CGEN_OPERAND_HASH_PREFIX), pc, length);
+      print_unsigned_with_hash_prefix (cd, info, fields->f_uimm16, 0, pc, length);
       break;
     case M32R_OPERAND_UIMM24 :
-      print_address (cd, info, fields->f_uimm24, 0|(1<<CGEN_OPERAND_HASH_PREFIX)|(1<<CGEN_OPERAND_RELOC)|(1<<CGEN_OPERAND_ABS_ADDR), pc, length);
+      print_address (cd, info, fields->f_uimm24, 0|(1<<CGEN_OPERAND_RELOC)|(1<<CGEN_OPERAND_ABS_ADDR), pc, length);
       break;
     case M32R_OPERAND_UIMM3 :
-      print_normal (cd, info, fields->f_uimm3, 0|(1<<CGEN_OPERAND_HASH_PREFIX), pc, length);
+      print_unsigned_with_hash_prefix (cd, info, fields->f_uimm3, 0, pc, length);
       break;
     case M32R_OPERAND_UIMM4 :
-      print_normal (cd, info, fields->f_uimm4, 0|(1<<CGEN_OPERAND_HASH_PREFIX), pc, length);
+      print_unsigned_with_hash_prefix (cd, info, fields->f_uimm4, 0, pc, length);
       break;
     case M32R_OPERAND_UIMM5 :
-      print_normal (cd, info, fields->f_uimm5, 0|(1<<CGEN_OPERAND_HASH_PREFIX), pc, length);
+      print_unsigned_with_hash_prefix (cd, info, fields->f_uimm5, 0, pc, length);
       break;
     case M32R_OPERAND_UIMM8 :
-      print_normal (cd, info, fields->f_uimm8, 0|(1<<CGEN_OPERAND_HASH_PREFIX), pc, length);
+      print_unsigned_with_hash_prefix (cd, info, fields->f_uimm8, 0, pc, length);
       break;
     case M32R_OPERAND_ULO16 :
       print_normal (cd, info, fields->f_uimm16, 0, pc, length);
@@ -287,10 +310,6 @@ print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_NORMAL
-  CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* nothing to do */
@@ -312,10 +331,6 @@ print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_ADDRESS
-  CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* Nothing to do.  */
index 56c4d564b6a148017ca557d081fd48d2353d142d..e0f26163a776d474c57a1c7c9d52e4c458435caa 100644 (file)
@@ -1223,10 +1223,6 @@ print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_NORMAL
-  CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* nothing to do */
@@ -1248,10 +1244,6 @@ print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_ADDRESS
-  CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* Nothing to do.  */
index f06a98fb24710bc6e784581f481b48609c1d96d1..28f4655e268fb6ba060b25a819a2b665816c22d9 100644 (file)
@@ -321,10 +321,6 @@ print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_NORMAL
-  CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* nothing to do */
@@ -346,10 +342,6 @@ print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_ADDRESS
-  CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* Nothing to do.  */
index 31a327c0ce89bd7f743a74fdb87544742ce026fd..2c442f964a2493a35a97f3e94fd0dec01db79880 100644 (file)
@@ -166,10 +166,6 @@ print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_NORMAL
-  CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* nothing to do */
@@ -191,10 +187,6 @@ print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_ADDRESS
-  CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* Nothing to do.  */
index 1880ce783dbca1bb30a74e0422ac6ad1e24424a8..09bb73bf31d8dca6a5571c9f958bc61f7f05c6b9 100644 (file)
@@ -60,17 +60,62 @@ static int read_insn
 
 /* -- dis.c */
 
-#define CGEN_PRINT_NORMAL(cd, info, value, attrs, pc, length)  \
-  do                                                           \
-    {                                                          \
-      if (CGEN_BOOL_ATTR ((attrs), CGEN_OPERAND_DOT_PREFIX))   \
-        info->fprintf_func (info->stream, ".");                        \
-      if (CGEN_BOOL_ATTR ((attrs), CGEN_OPERAND_POF_PREFIX))   \
-        info->fprintf_func (info->stream, "#pof:");            \
-      if (CGEN_BOOL_ATTR ((attrs), CGEN_OPERAND_PAG_PREFIX))   \
-        info->fprintf_func (info->stream, "#pag:");            \
-    }                                                          \
-  while (0)
+/* Print an operand with a "." prefix.
+   NOTE: This prints the operand in hex.
+   ??? This exists to maintain disassembler compatibility with previous
+   versions.  Ideally we'd print the "." in print_dot.  */
+
+static void
+print_with_dot_prefix (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+                      void * dis_info,
+                      long value,
+                      unsigned attrs ATTRIBUTE_UNUSED,
+                      bfd_vma pc ATTRIBUTE_UNUSED,
+                      int length ATTRIBUTE_UNUSED)
+{
+  disassemble_info *info = (disassemble_info *) dis_info;
+
+  info->fprintf_func (info->stream, ".");
+  info->fprintf_func (info->stream, "0x%lx", value);
+}
+
+/* Print an operand with a "#pof:" prefix.
+   NOTE: This prints the operand as an address.
+   ??? This exists to maintain disassembler compatibility with previous
+   versions.  Ideally we'd print "#pof:" in print_pof.  */
+
+static void
+print_with_pof_prefix (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+                      void * dis_info,
+                      bfd_vma value,
+                      unsigned attrs ATTRIBUTE_UNUSED,
+                      bfd_vma pc ATTRIBUTE_UNUSED,
+                      int length ATTRIBUTE_UNUSED)
+{
+  disassemble_info *info = (disassemble_info *) dis_info;
+
+  info->fprintf_func (info->stream, "#pof:");
+  info->fprintf_func (info->stream, "0x%lx", (long) value);
+}
+
+/* Print an operand with a "#pag:" prefix.
+   NOTE: This prints the operand in hex.
+   ??? This exists to maintain disassembler compatibility with previous
+   versions.  Ideally we'd print "#pag:" in print_pag.  */
+
+static void
+print_with_pag_prefix (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+                      void * dis_info,
+                      long value,
+                      unsigned attrs ATTRIBUTE_UNUSED,
+                      bfd_vma pc ATTRIBUTE_UNUSED,
+                      int length ATTRIBUTE_UNUSED)
+{
+  disassemble_info *info = (disassemble_info *) dis_info;
+
+  info->fprintf_func (info->stream, "#pag:");
+  info->fprintf_func (info->stream, "0x%lx", value);
+}
 
 /* Print a 'pof:' prefix to an operand.  */
 
@@ -271,13 +316,13 @@ xc16x_cgen_print_operand (CGEN_CPU_DESC cd,
       print_pof (cd, info, 0, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
       break;
     case XC16X_OPERAND_QBIT :
-      print_normal (cd, info, fields->f_qbit, 0|(1<<CGEN_OPERAND_DOT_PREFIX), pc, length);
+      print_with_dot_prefix (cd, info, fields->f_qbit, 0|(1<<CGEN_OPERAND_DOT_PREFIX), pc, length);
       break;
     case XC16X_OPERAND_QHIBIT :
-      print_normal (cd, info, fields->f_qhibit, 0|(1<<CGEN_OPERAND_DOT_PREFIX), pc, length);
+      print_with_dot_prefix (cd, info, fields->f_qhibit, 0|(1<<CGEN_OPERAND_DOT_PREFIX), pc, length);
       break;
     case XC16X_OPERAND_QLOBIT :
-      print_normal (cd, info, fields->f_qlobit, 0|(1<<CGEN_OPERAND_DOT_PREFIX), pc, length);
+      print_with_dot_prefix (cd, info, fields->f_qlobit, 0|(1<<CGEN_OPERAND_DOT_PREFIX), pc, length);
       break;
     case XC16X_OPERAND_REG8 :
       print_keyword (cd, info, & xc16x_cgen_opval_r8_names, fields->f_reg8, 0);
@@ -355,10 +400,10 @@ xc16x_cgen_print_operand (CGEN_CPU_DESC cd,
       print_normal (cd, info, fields->f_uimm8, 0|(1<<CGEN_OPERAND_HASH_PREFIX), pc, length);
       break;
     case XC16X_OPERAND_UPAG16 :
-      print_normal (cd, info, fields->f_uimm16, 0|(1<<CGEN_OPERAND_PAG_PREFIX), pc, length);
+      print_with_pag_prefix (cd, info, fields->f_uimm16, 0|(1<<CGEN_OPERAND_PAG_PREFIX), pc, length);
       break;
     case XC16X_OPERAND_UPOF16 :
-      print_address (cd, info, fields->f_memory, 0|(1<<CGEN_OPERAND_POF_PREFIX), pc, length);
+      print_with_pof_prefix (cd, info, fields->f_memory, 0|(1<<CGEN_OPERAND_POF_PREFIX), pc, length);
       break;
     case XC16X_OPERAND_USEG16 :
       print_normal (cd, info, fields->f_offset16, 0|(1<<CGEN_OPERAND_SEG_PREFIX)|(1<<CGEN_OPERAND_RELOC)|(1<<CGEN_OPERAND_ABS_ADDR), pc, length);
@@ -406,10 +451,6 @@ print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_NORMAL
-  CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* nothing to do */
@@ -431,10 +472,6 @@ print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_ADDRESS
-  CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* Nothing to do.  */
index d17a0600b92fd67b90a526476fde39a70a041bf2..af81ab488c26716da5df3c98c38c8b6fa5790fb2 100644 (file)
@@ -199,10 +199,6 @@ print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_NORMAL
-  CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* nothing to do */
@@ -224,10 +220,6 @@ print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
-#ifdef CGEN_PRINT_ADDRESS
-  CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length);
-#endif
-
   /* Print the operand as directed by the attributes.  */
   if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
     ; /* Nothing to do.  */
This page took 0.05834 seconds and 4 git commands to generate.