Changeset 609 for branches/GNU/src/binutils/opcodes/vax-dis.c
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/opcodes/vax-dis.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 1 /* Print VAX instructions. 2 Copyright 1995, 1998, 2000, 2001 Free Software Foundation, Inc.2 Copyright 1995, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. 3 3 Contributed by Pauline Middelink <middelin@polyware.iaf.nl> 4 4 … … 22 22 23 23 /* Local function prototypes */ 24 static int 25 print_insn_arg PARAMS ((const char *, unsigned char *, bfd_vma, 26 27 28 static int 29 print_insn_mode PARAMS ((int, unsigned char *, bfd_vma, disassemble_info *)); 24 static int fetch_data PARAMS ((struct disassemble_info *, bfd_byte *)); 25 static int print_insn_arg 26 PARAMS ((const char *, unsigned char *, bfd_vma, disassemble_info *)); 27 static int print_insn_mode 28 PARAMS ((const char *, int, unsigned char *, bfd_vma, disassemble_info *)); 29 30 30 31 31 static char *reg_names[] = … … 113 113 { 114 114 const struct vot *votp; 115 const char *argp = NULL;115 const char *argp; 116 116 unsigned char *arg; 117 117 struct private priv; … … 121 121 priv.max_fetched = priv.the_buffer; 122 122 priv.insn_start = memaddr; 123 123 124 if (setjmp (priv.bailout) != 0) 124 125 { … … 127 128 } 128 129 130 argp = NULL; 129 131 /* Check if the info buffer has more than one byte left since 130 132 the last opcode might be a single byte with no argument data. */ … … 222 224 } 223 225 224 return print_insn_mode ( arg_len, p0, addr, info);226 return print_insn_mode (d, arg_len, p0, addr, info); 225 227 } 226 228 227 229 static int 228 print_insn_mode (size, p0, addr, info) 230 print_insn_mode (d, size, p0, addr, info) 231 const char *d; 229 232 int size; 230 233 unsigned char *p0; … … 244 247 case 0x20: 245 248 case 0x30: /* literal mode $number */ 246 (*info->fprintf_func) (info->stream, "$0x%x", mode); 249 if (d[1] == 'd' || d[1] == 'f' || d[1] == 'g' || d[1] == 'h') 250 (*info->fprintf_func) (info->stream, "$0x%x [%c-float]", mode, d[1]); 251 else 252 (*info->fprintf_func) (info->stream, "$0x%x", mode); 247 253 break; 248 254 case 0x40: /* index: base-addr[Rn] */ 249 p += print_insn_mode ( size, p0 + 1, addr + 1, info);255 p += print_insn_mode (d, size, p0 + 1, addr + 1, info); 250 256 (*info->fprintf_func) (info->stream, "[%s]", reg_names[reg]); 251 257 break; … … 266 272 FETCH_DATA (info, p + size); 267 273 (*info->fprintf_func) (info->stream, "$0x"); 268 for (i = 0; i < size; i++) 269 (*info->fprintf_func) (info->stream, "%02x", p[size - i - 1]); 274 if (d[1] == 'd' || d[1] == 'f' || d[1] == 'g' || d[1] == 'h') 275 { 276 int float_word; 277 278 float_word = p[0] | (p[1] << 8); 279 if ((d[1] == 'd' || d[1] == 'f') 280 && (float_word & 0xff80) == 0x8000) 281 { 282 (*info->fprintf_func) (info->stream, "[invalid %c-float]", 283 d[1]); 284 } 285 else 286 { 287 for (i = 0; i < size; i++) 288 (*info->fprintf_func) (info->stream, "%02x", 289 p[size - i - 1]); 290 (*info->fprintf_func) (info->stream, " [%c-float]", d[1]); 291 } 292 } 293 else 294 { 295 for (i = 0; i < size; i++) 296 (*info->fprintf_func) (info->stream, "%02x", p[size - i - 1]); 297 } 270 298 p += size; 271 299 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.