Changeset 609 for branches/GNU/src/binutils/opcodes/v850-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/v850-dis.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 1 /* Disassemble V850 instructions. 2 Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc. 2 Copyright 1996, 1997, 1998, 2000, 2001, 2002 3 Free Software Foundation, Inc. 3 4 4 5 This program is free software; you can redistribute it and/or modify … … 42 43 "nv", "nc/nl", "nz", "h", "ns/p", "sa", "ge", "gt" }; 43 44 45 static int disassemble 46 PARAMS ((bfd_vma, struct disassemble_info *, unsigned long)); 47 44 48 static int 45 49 disassemble (memaddr, info, insn) … … 48 52 unsigned long insn; 49 53 { 50 struct v850_opcode * 51 const struct v850_operand * 52 int 53 int 54 int 55 int 54 struct v850_opcode *op = (struct v850_opcode *)v850_opcodes; 55 const struct v850_operand *operand; 56 int match = 0; 57 int short_op = ((insn & 0x0600) != 0x0600); 58 int bytes_read; 59 int target_processor; 56 60 57 61 /* Special case: 32 bit MOV */ 58 62 if ((insn & 0xffe0) == 0x0620) 59 short_op = true;63 short_op = 1; 60 64 61 65 bytes_read = short_op ? 2 : 4; … … 75 79 target_processor = PROCESSOR_V850E; 76 80 break; 77 78 case bfd_mach_v850ea:79 target_processor = PROCESSOR_V850EA;80 break;81 81 } 82 82 … … 87 87 && (op->processors & target_processor)) 88 88 { 89 const unsigned char * 90 unsigned int 91 unsigned int 89 const unsigned char *opindex_ptr; 90 unsigned int opnum; 91 unsigned int memop; 92 92 93 93 match = 1; … … 113 113 opindex_ptr++, opnum++) 114 114 { 115 long 116 int 117 int 118 bfd_byte buffer[ 4];115 long value; 116 int flag; 117 int status; 118 bfd_byte buffer[4]; 119 119 120 120 operand = &v850_operands[*opindex_ptr]; … … 205 205 static int list18_h_regs[32] = { 19, 18, 17, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 30, 31, 29, 28, 23, 22, 21, 20, 27, 26, 25, 24 }; 206 206 static int list18_l_regs[32] = { 3, 2, 1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 14, 15, 13, 12, 7, 6, 5, 4, 11, 10, 9, 8 }; 207 int * 208 int 207 int *regs; 208 int i; 209 209 unsigned long int mask = 0; 210 int pc = false;211 int sr = false;210 int pc = 0; 211 int sr = 0; 212 212 213 213 … … 232 232 /* xgettext:c-format */ 233 233 case 0: fprintf (stderr, _("unknown pop reg: %d\n"), i ); abort(); 234 case -1: pc = true; break;235 case -2: sr = true; break;234 case -1: pc = 1; break; 235 case -2: sr = 1; break; 236 236 } 237 237 } … … 245 245 { 246 246 unsigned int bit; 247 int shown_one = false;247 int shown_one = 0; 248 248 249 249 for (bit = 0; bit < 32; bit++) … … 256 256 info->fprintf_func (info->stream, ", "); 257 257 else 258 shown_one = true;258 shown_one = 1; 259 259 260 260 info->fprintf_func (info->stream, v850_reg_names[first]); … … 349 349 struct disassemble_info * info; 350 350 { 351 int 352 bfd_byte buffer[ 4];351 int status; 352 bfd_byte buffer[4]; 353 353 unsigned long insn = 0; 354 354 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.