Diff for /qemu/alpha-dis.c between versions 1.1.1.5 and 1.1.1.6

version 1.1.1.5, 2018/04/24 17:20:43 version 1.1.1.6, 2018/04/24 17:34:21
Line 108  struct alpha_operand Line 108  struct alpha_operand
      string (the operand will be inserted in any case).  If the       string (the operand will be inserted in any case).  If the
      operand value is legal, *ERRMSG will be unchanged (most operands       operand value is legal, *ERRMSG will be unchanged (most operands
      can accept any value).  */       can accept any value).  */
   unsigned (*insert) PARAMS ((unsigned instruction, int op,    unsigned (*insert) (unsigned instruction, int op,
                               const char **errmsg));                        const char **errmsg);
   
   /* Extraction function.  This is used by the disassembler.  To    /* Extraction function.  This is used by the disassembler.  To
      extract this operand type from an instruction, check this field.       extract this operand type from an instruction, check this field.
Line 128  struct alpha_operand Line 128  struct alpha_operand
      non-zero if this operand type can not actually be extracted from       non-zero if this operand type can not actually be extracted from
      this operand (i.e., the instruction does not match).  If the       this operand (i.e., the instruction does not match).  If the
      operand is valid, *INVALID will not be changed.  */       operand is valid, *INVALID will not be changed.  */
   int (*extract) PARAMS ((unsigned instruction, int *invalid));    int (*extract) (unsigned instruction, int *invalid);
 };  };
   
 /* Elements in the table are retrieved by indexing with values from  /* Elements in the table are retrieved by indexing with values from
Line 158  extern const unsigned alpha_num_operands Line 158  extern const unsigned alpha_num_operands
    instructions which want their operands to look like "Ra,disp(Rb)".  */     instructions which want their operands to look like "Ra,disp(Rb)".  */
 #define AXP_OPERAND_PARENS      02  #define AXP_OPERAND_PARENS      02
   
 /* Used in combination with PARENS, this supresses the supression of  /* Used in combination with PARENS, this suppresses the suppression of
    the comma.  This is used for "jmp Ra,(Rb),hint".  */     the comma.  This is used for "jmp Ra,(Rb),hint".  */
 #define AXP_OPERAND_COMMA       04  #define AXP_OPERAND_COMMA       04
   
Line 179  extern const unsigned alpha_num_operands Line 179  extern const unsigned alpha_num_operands
    a flags value of 0 can be treated as end-of-arguments.  */     a flags value of 0 can be treated as end-of-arguments.  */
 #define AXP_OPERAND_UNSIGNED    0200  #define AXP_OPERAND_UNSIGNED    0200
   
 /* Supress overflow detection on this field.  This is used for hints. */  /* Suppress overflow detection on this field.  This is used for hints. */
 #define AXP_OPERAND_NOOVERFLOW  0400  #define AXP_OPERAND_NOOVERFLOW  0400
   
 /* Mask for optional argument default value.  */  /* Mask for optional argument default value.  */
Line 273  enum bfd_reloc_code_real { Line 273  enum bfd_reloc_code_real {
   
 /* Local insertion and extraction functions */  /* Local insertion and extraction functions */
   
 static unsigned insert_rba PARAMS((unsigned, int, const char **));  static unsigned insert_rba (unsigned, int, const char **);
 static unsigned insert_rca PARAMS((unsigned, int, const char **));  static unsigned insert_rca (unsigned, int, const char **);
 static unsigned insert_za PARAMS((unsigned, int, const char **));  static unsigned insert_za (unsigned, int, const char **);
 static unsigned insert_zb PARAMS((unsigned, int, const char **));  static unsigned insert_zb (unsigned, int, const char **);
 static unsigned insert_zc PARAMS((unsigned, int, const char **));  static unsigned insert_zc (unsigned, int, const char **);
 static unsigned insert_bdisp PARAMS((unsigned, int, const char **));  static unsigned insert_bdisp (unsigned, int, const char **);
 static unsigned insert_jhint PARAMS((unsigned, int, const char **));  static unsigned insert_jhint (unsigned, int, const char **);
 static unsigned insert_ev6hwjhint PARAMS((unsigned, int, const char **));  static unsigned insert_ev6hwjhint (unsigned, int, const char **);
   
 static int extract_rba PARAMS((unsigned, int *));  static int extract_rba (unsigned, int *);
 static int extract_rca PARAMS((unsigned, int *));  static int extract_rca (unsigned, int *);
 static int extract_za PARAMS((unsigned, int *));  static int extract_za (unsigned, int *);
 static int extract_zb PARAMS((unsigned, int *));  static int extract_zb (unsigned, int *);
 static int extract_zc PARAMS((unsigned, int *));  static int extract_zc (unsigned, int *);
 static int extract_bdisp PARAMS((unsigned, int *));  static int extract_bdisp (unsigned, int *);
 static int extract_jhint PARAMS((unsigned, int *));  static int extract_jhint (unsigned, int *);
 static int extract_ev6hwjhint PARAMS((unsigned, int *));  static int extract_ev6hwjhint (unsigned, int *);
   
   
 /* The operands table  */  /* The operands table  */
Line 434  const unsigned alpha_num_operands = size Line 434  const unsigned alpha_num_operands = size
   
 /*ARGSUSED*/  /*ARGSUSED*/
 static unsigned  static unsigned
 insert_rba(insn, value, errmsg)  insert_rba(unsigned insn, int value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
      unsigned insn;  
      int value ATTRIBUTE_UNUSED;  
      const char **errmsg ATTRIBUTE_UNUSED;  
 {  {
   return insn | (((insn >> 21) & 0x1f) << 16);    return insn | (((insn >> 21) & 0x1f) << 16);
 }  }
   
 static int  static int
 extract_rba(insn, invalid)  extract_rba(unsigned insn, int *invalid)
      unsigned insn;  
      int *invalid;  
 {  {
   if (invalid != (int *) NULL    if (invalid != (int *) NULL
       && ((insn >> 21) & 0x1f) != ((insn >> 16) & 0x1f))        && ((insn >> 21) & 0x1f) != ((insn >> 16) & 0x1f))
Line 458  extract_rba(insn, invalid) Line 453  extract_rba(insn, invalid)
   
 /*ARGSUSED*/  /*ARGSUSED*/
 static unsigned  static unsigned
 insert_rca(insn, value, errmsg)  insert_rca(unsigned insn, int value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
      unsigned insn;  
      int value ATTRIBUTE_UNUSED;  
      const char **errmsg ATTRIBUTE_UNUSED;  
 {  {
   return insn | ((insn >> 21) & 0x1f);    return insn | ((insn >> 21) & 0x1f);
 }  }
   
 static int  static int
 extract_rca(insn, invalid)  extract_rca(unsigned insn, int *invalid)
      unsigned insn;  
      int *invalid;  
 {  {
   if (invalid != (int *) NULL    if (invalid != (int *) NULL
       && ((insn >> 21) & 0x1f) != (insn & 0x1f))        && ((insn >> 21) & 0x1f) != (insn & 0x1f))
Line 482  extract_rca(insn, invalid) Line 472  extract_rca(insn, invalid)
   
 /*ARGSUSED*/  /*ARGSUSED*/
 static unsigned  static unsigned
 insert_za(insn, value, errmsg)  insert_za(unsigned insn, int value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
      unsigned insn;  
      int value ATTRIBUTE_UNUSED;  
      const char **errmsg ATTRIBUTE_UNUSED;  
 {  {
   return insn | (31 << 21);    return insn | (31 << 21);
 }  }
   
 static int  static int
 extract_za(insn, invalid)  extract_za(unsigned insn, int *invalid)
      unsigned insn;  
      int *invalid;  
 {  {
   if (invalid != (int *) NULL && ((insn >> 21) & 0x1f) != 31)    if (invalid != (int *) NULL && ((insn >> 21) & 0x1f) != 31)
     *invalid = 1;      *invalid = 1;
Line 502  extract_za(insn, invalid) Line 487  extract_za(insn, invalid)
   
 /*ARGSUSED*/  /*ARGSUSED*/
 static unsigned  static unsigned
 insert_zb(insn, value, errmsg)  insert_zb(unsigned insn, int value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
      unsigned insn;  
      int value ATTRIBUTE_UNUSED;  
      const char **errmsg ATTRIBUTE_UNUSED;  
 {  {
   return insn | (31 << 16);    return insn | (31 << 16);
 }  }
   
 static int  static int
 extract_zb(insn, invalid)  extract_zb(unsigned insn, int *invalid)
      unsigned insn;  
      int *invalid;  
 {  {
   if (invalid != (int *) NULL && ((insn >> 16) & 0x1f) != 31)    if (invalid != (int *) NULL && ((insn >> 16) & 0x1f) != 31)
     *invalid = 1;      *invalid = 1;
Line 522  extract_zb(insn, invalid) Line 502  extract_zb(insn, invalid)
   
 /*ARGSUSED*/  /*ARGSUSED*/
 static unsigned  static unsigned
 insert_zc(insn, value, errmsg)  insert_zc(unsigned insn, int value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
      unsigned insn;  
      int value ATTRIBUTE_UNUSED;  
      const char **errmsg ATTRIBUTE_UNUSED;  
 {  {
   return insn | 31;    return insn | 31;
 }  }
   
 static int  static int
 extract_zc(insn, invalid)  extract_zc(unsigned insn, int *invalid)
      unsigned insn;  
      int *invalid;  
 {  {
   if (invalid != (int *) NULL && (insn & 0x1f) != 31)    if (invalid != (int *) NULL && (insn & 0x1f) != 31)
     *invalid = 1;      *invalid = 1;
Line 544  extract_zc(insn, invalid) Line 519  extract_zc(insn, invalid)
 /* The displacement field of a Branch format insn.  */  /* The displacement field of a Branch format insn.  */
   
 static unsigned  static unsigned
 insert_bdisp(insn, value, errmsg)  insert_bdisp(unsigned insn, int value, const char **errmsg)
      unsigned insn;  
      int value;  
      const char **errmsg;  
 {  {
   if (errmsg != (const char **)NULL && (value & 3))    if (errmsg != (const char **)NULL && (value & 3))
     *errmsg = _("branch operand unaligned");      *errmsg = _("branch operand unaligned");
Line 556  insert_bdisp(insn, value, errmsg) Line 528  insert_bdisp(insn, value, errmsg)
   
 /*ARGSUSED*/  /*ARGSUSED*/
 static int  static int
 extract_bdisp(insn, invalid)  extract_bdisp(unsigned insn, int *invalid ATTRIBUTE_UNUSED)
      unsigned insn;  
      int *invalid ATTRIBUTE_UNUSED;  
 {  {
   return 4 * (((insn & 0x1FFFFF) ^ 0x100000) - 0x100000);    return 4 * (((insn & 0x1FFFFF) ^ 0x100000) - 0x100000);
 }  }
Line 567  extract_bdisp(insn, invalid) Line 537  extract_bdisp(insn, invalid)
 /* The hint field of a JMP/JSR insn.  */  /* The hint field of a JMP/JSR insn.  */
   
 static unsigned  static unsigned
 insert_jhint(insn, value, errmsg)  insert_jhint(unsigned insn, int value, const char **errmsg)
      unsigned insn;  
      int value;  
      const char **errmsg;  
 {  {
   if (errmsg != (const char **)NULL && (value & 3))    if (errmsg != (const char **)NULL && (value & 3))
     *errmsg = _("jump hint unaligned");      *errmsg = _("jump hint unaligned");
Line 579  insert_jhint(insn, value, errmsg) Line 546  insert_jhint(insn, value, errmsg)
   
 /*ARGSUSED*/  /*ARGSUSED*/
 static int  static int
 extract_jhint(insn, invalid)  extract_jhint(unsigned insn, int *invalid ATTRIBUTE_UNUSED)
      unsigned insn;  
      int *invalid ATTRIBUTE_UNUSED;  
 {  {
   return 4 * (((insn & 0x3FFF) ^ 0x2000) - 0x2000);    return 4 * (((insn & 0x3FFF) ^ 0x2000) - 0x2000);
 }  }
Line 589  extract_jhint(insn, invalid) Line 554  extract_jhint(insn, invalid)
 /* The hint field of an EV6 HW_JMP/JSR insn.  */  /* The hint field of an EV6 HW_JMP/JSR insn.  */
   
 static unsigned  static unsigned
 insert_ev6hwjhint(insn, value, errmsg)  insert_ev6hwjhint(unsigned insn, int value, const char **errmsg)
      unsigned insn;  
      int value;  
      const char **errmsg;  
 {  {
   if (errmsg != (const char **)NULL && (value & 3))    if (errmsg != (const char **)NULL && (value & 3))
     *errmsg = _("jump hint unaligned");      *errmsg = _("jump hint unaligned");
Line 601  insert_ev6hwjhint(insn, value, errmsg) Line 563  insert_ev6hwjhint(insn, value, errmsg)
   
 /*ARGSUSED*/  /*ARGSUSED*/
 static int  static int
 extract_ev6hwjhint(insn, invalid)  extract_ev6hwjhint(unsigned insn, int *invalid ATTRIBUTE_UNUSED)
      unsigned insn;  
      int *invalid ATTRIBUTE_UNUSED;  
 {  {
   return 4 * (((insn & 0x1FFF) ^ 0x1000) - 0x1000);    return 4 * (((insn & 0x1FFF) ^ 0x1000) - 0x1000);
 }  }
Line 1804  static const char * const vms_regnames[6 Line 1764  static const char * const vms_regnames[6
 /* Disassemble Alpha instructions.  */  /* Disassemble Alpha instructions.  */
   
 int  int
 print_insn_alpha (memaddr, info)  print_insn_alpha (bfd_vma memaddr, struct disassemble_info *info)
      bfd_vma memaddr;  
      struct disassemble_info *info;  
 {  {
   static const struct alpha_opcode *opcode_index[AXP_NOPS+1];    static const struct alpha_opcode *opcode_index[AXP_NOPS+1];
   const char * const * regnames;    const char * const * regnames;

Removed from v.1.1.1.5  
changed lines
  Added in v.1.1.1.6


unix.superglobalmegacorp.com