Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/opcodes/v850-dis.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* 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.
    34
    45This program is free software; you can redistribute it and/or modify
     
    4243  "nv", "nc/nl", "nz", "h", "ns/p", "sa", "ge", "gt" };
    4344
     45static int disassemble
     46  PARAMS ((bfd_vma, struct disassemble_info *, unsigned long));
     47
    4448static int
    4549disassemble (memaddr, info, insn)
     
    4852     unsigned long insn;
    4953{
    50   struct v850_opcode *          op = (struct v850_opcode *)v850_opcodes;
    51   const struct v850_operand *   operand;
    52   int                           match = 0;
    53   int                           short_op = ((insn & 0x0600) != 0x0600);
    54   int                           bytes_read;
    55   int                           target_processor;
     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;
    5660 
    5761  /* Special case: 32 bit MOV */
    5862  if ((insn & 0xffe0) == 0x0620)
    59     short_op = true;
     63    short_op = 1;
    6064 
    6165  bytes_read = short_op ? 2 : 4;
     
    7579      target_processor = PROCESSOR_V850E;
    7680      break;
    77 
    78     case bfd_mach_v850ea:
    79       target_processor = PROCESSOR_V850EA;
    80       break;
    8181    }
    8282 
     
    8787          && (op->processors & target_processor))
    8888        {
    89           const unsigned char * opindex_ptr;
    90           unsigned int          opnum;
    91           unsigned int          memop;
     89          const unsigned char *opindex_ptr;
     90          unsigned int opnum;
     91          unsigned int memop;
    9292
    9393          match = 1;
     
    113113               opindex_ptr++, opnum++)
    114114            {
    115               long      value;
    116               int       flag;
    117               int       status;
    118               bfd_byte  buffer[ 4 ];
     115              long value;
     116              int flag;
     117              int status;
     118              bfd_byte buffer[4];
    119119             
    120120              operand = &v850_operands[*opindex_ptr];
     
    205205                    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 };
    206206                    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 *             regs;
    208                     int               i;
     207                    int *regs;
     208                    int i;
    209209                    unsigned long int mask = 0;
    210                     int               pc   = false;
    211                     int               sr   = false;
     210                    int pc = 0;
     211                    int sr = 0;
    212212                   
    213213                   
     
    232232                                /* xgettext:c-format */
    233233                              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;
    236236                              }
    237237                          }
     
    245245                          {
    246246                            unsigned int bit;
    247                             int          shown_one = false;
     247                            int shown_one = 0;
    248248                           
    249249                            for (bit = 0; bit < 32; bit++)
     
    256256                                    info->fprintf_func (info->stream, ", ");
    257257                                  else
    258                                     shown_one = true;
     258                                    shown_one = 1;
    259259                                 
    260260                                  info->fprintf_func (info->stream, v850_reg_names[first]);
     
    349349     struct disassemble_info * info;
    350350{
    351   int           status;
    352   bfd_byte      buffer[ 4 ];
     351  int status;
     352  bfd_byte buffer[4];
    353353  unsigned long insn = 0;
    354354
Note: See TracChangeset for help on using the changeset viewer.