1.1 --- a/src/x86dasm/i386-dis.c Thu Jan 15 11:23:20 2009 +0000
1.2 +++ b/src/x86dasm/i386-dis.c Fri Feb 24 21:11:58 2012 +1000
1.4 static void oappend (const char *);
1.5 static void append_seg (void);
1.6 static void OP_indirE (int, int);
1.7 -static void print_operand_value (char *, int, bfd_vma);
1.8 static void OP_E (int, int);
1.9 static void OP_G (int, int);
1.10 static bfd_vma get64 (void);
1.11 @@ -3058,66 +3057,6 @@
1.15 -print_operand_value (char *buf, int hex, bfd_vma disp)
1.25 - sprintf_vma (tmp, disp);
1.26 - for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++);
1.27 - strcpy (buf + 2, tmp + i);
1.31 - bfd_signed_vma v = disp;
1.38 - /* Check for possible overflow on 0x8000000000000000. */
1.41 - strcpy (buf, "9223372036854775808");
1.47 - strcpy (buf, "0");
1.55 - tmp[28 - i] = (v % 10) + '0';
1.59 - strcpy (buf, tmp + 29 - i);
1.64 - x86_print_symbolic_operand( buf, hex, disp );
1.67 - sprintf (buf, "0x%x", (unsigned int) disp);
1.69 - sprintf (buf, "%d", (int) disp);
1.75 OP_E (int bytemode, int sizeflag)
1.78 @@ -3236,7 +3175,7 @@
1.80 if (mod != 0 || (base & 7) == 5)
1.82 - print_operand_value (scratchbuf, !riprel, disp);
1.83 + x86_print_symbolic_operand (scratchbuf, !riprel, disp);
1.84 oappend (scratchbuf);
1.87 @@ -3342,7 +3281,7 @@
1.91 - print_operand_value (scratchbuf, 0, disp);
1.92 + x86_print_symbolic_operand (scratchbuf, 0, disp);
1.93 oappend (scratchbuf);
1.96 @@ -3362,7 +3301,7 @@
1.97 oappend (names_seg[ds_reg - es_reg]);
1.100 - print_operand_value (scratchbuf, 1, disp);
1.101 + x86_print_symbolic_operand (scratchbuf, 1, disp);
1.102 oappend (scratchbuf);
1.105 @@ -3395,7 +3334,7 @@
1.107 if (mod != 0 || (rm & 7) == 6)
1.109 - print_operand_value (scratchbuf, 0, disp);
1.110 + x86_print_symbolic_operand (scratchbuf, 0, disp);
1.111 oappend (scratchbuf);
1.114 @@ -3693,7 +3632,7 @@
1.117 scratchbuf[0] = '$';
1.118 - print_operand_value (scratchbuf + 1, 1, op);
1.119 + x86_print_symbolic_operand (scratchbuf + 1, 1, op);
1.120 oappend (scratchbuf + intel_syntax);
1.121 scratchbuf[0] = '\0';
1.123 @@ -3744,7 +3683,7 @@
1.126 scratchbuf[0] = '$';
1.127 - print_operand_value (scratchbuf + 1, 1, op);
1.128 + x86_print_symbolic_operand (scratchbuf + 1, 1, op);
1.129 oappend (scratchbuf + intel_syntax);
1.130 scratchbuf[0] = '\0';
1.132 @@ -3794,7 +3733,7 @@
1.135 scratchbuf[0] = '$';
1.136 - print_operand_value (scratchbuf + 1, 1, op);
1.137 + x86_print_symbolic_operand (scratchbuf + 1, 1, op);
1.138 oappend (scratchbuf + intel_syntax);
1.141 @@ -3830,7 +3769,7 @@
1.143 disp = (start_pc + codep - start_codep + disp) & mask;
1.145 - print_operand_value (scratchbuf, 1, disp);
1.146 + x86_print_symbolic_operand (scratchbuf, 1, disp);
1.147 oappend (scratchbuf);
1.150 @@ -3884,7 +3823,7 @@
1.154 - print_operand_value (scratchbuf, 1, off);
1.155 + x86_print_symbolic_operand (scratchbuf, 1, off);
1.156 oappend (scratchbuf);
1.159 @@ -3912,7 +3851,7 @@
1.163 - print_operand_value (scratchbuf, 1, off);
1.164 + x86_print_symbolic_operand (scratchbuf, 1, off);
1.165 oappend (scratchbuf);