Diff for /qemu/sh4-dis.c between versions 1.1.1.3 and 1.1.1.7

version 1.1.1.3, 2018/04/24 16:50:58 version 1.1.1.7, 2018/04/24 18:34:27
Line 13 Line 13
    GNU General Public License for more details.     GNU General Public License for more details.
   
    You should have received a copy of the GNU General Public License     You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software     along with this program; if not, see <http://www.gnu.org/licenses/>.  */
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,  
    MA 02110-1301, USA.  */  
   
 #include <stdio.h>  #include <stdio.h>
 #include "dis-asm.h"  #include "dis-asm.h"
Line 1165  const sh_opcode_info sh_table[] = Line 1163  const sh_opcode_info sh_table[] =
 #define INCLUDE_SHMEDIA  #define INCLUDE_SHMEDIA
 #endif  #endif
   
 static void print_movxy  
   PARAMS ((const sh_opcode_info *, int, int, fprintf_ftype, void *));  
 static void print_insn_ddt PARAMS ((int, struct disassemble_info *));  
 static void print_dsp_reg PARAMS ((int, fprintf_ftype, void *));  
 static void print_insn_ppi PARAMS ((int, struct disassemble_info *));  
   
 static void  static void
 print_movxy (op, rn, rm, fprintf_fn, stream)  print_movxy (const sh_opcode_info *op, int rn, int rm,
      const sh_opcode_info *op;               fprintf_function fprintf_fn, void *stream)
      int rn, rm;  
      fprintf_ftype fprintf_fn;  
      void *stream;  
 {  {
   int n;    int n;
   
Line 1250  print_movxy (op, rn, rm, fprintf_fn, str Line 1239  print_movxy (op, rn, rm, fprintf_fn, str
    Return nonzero if a field b of a parallel processing insns follows.  */     Return nonzero if a field b of a parallel processing insns follows.  */
   
 static void  static void
 print_insn_ddt (insn, info)  print_insn_ddt (int insn, struct disassemble_info *info)
      int insn;  
      struct disassemble_info *info;  
 {  {
   fprintf_ftype fprintf_fn = info->fprintf_func;    fprintf_function fprintf_fn = info->fprintf_func;
   void *stream = info->stream;    void *stream = info->stream;
   
   /* If this is just a nop, make sure to emit something.  */    /* If this is just a nop, make sure to emit something.  */
Line 1339  print_insn_ddt (insn, info) Line 1326  print_insn_ddt (insn, info)
 }  }
   
 static void  static void
 print_dsp_reg (rm, fprintf_fn, stream)  print_dsp_reg (int rm, fprintf_function fprintf_fn, void *stream)
      int rm;  
      fprintf_ftype fprintf_fn;  
      void *stream;  
 {  {
   switch (rm)    switch (rm)
     {      {
Line 1383  print_dsp_reg (rm, fprintf_fn, stream) Line 1367  print_dsp_reg (rm, fprintf_fn, stream)
 }  }
   
 static void  static void
 print_insn_ppi (field_b, info)  print_insn_ppi (int field_b, struct disassemble_info *info)
      int field_b;  
      struct disassemble_info *info;  
 {  {
   static const char *sx_tab[] = { "x0", "x1", "a0", "a1" };    static const char *sx_tab[] = { "x0", "x1", "a0", "a1" };
   static const char *sy_tab[] = { "y0", "y1", "m0", "m1" };    static const char *sy_tab[] = { "y0", "y1", "m0", "m1" };
   fprintf_ftype fprintf_fn = info->fprintf_func;    fprintf_function fprintf_fn = info->fprintf_func;
   void *stream = info->stream;    void *stream = info->stream;
   unsigned int nib1, nib2, nib3;    unsigned int nib1, nib2, nib3;
   unsigned int altnib1, nib4;    unsigned int altnib1, nib4;
Line 1505  print_insn_ppi (field_b, info) Line 1487  print_insn_ppi (field_b, info)
                   print_dsp_reg (field_b & 0xf, fprintf_fn, stream);                    print_dsp_reg (field_b & 0xf, fprintf_fn, stream);
                   break;                    break;
                 case DSP_REG_X:                  case DSP_REG_X:
                   fprintf_fn (stream, sx_tab[(field_b >> 6) & 3]);                    fprintf_fn (stream, "%s", sx_tab[(field_b >> 6) & 3]);
                   break;                    break;
                 case DSP_REG_Y:                  case DSP_REG_Y:
                   fprintf_fn (stream, sy_tab[(field_b >> 4) & 3]);                    fprintf_fn (stream, "%s", sy_tab[(field_b >> 4) & 3]);
                   break;                    break;
                 case A_MACH:                  case A_MACH:
                   fprintf_fn (stream, "mach");                    fprintf_fn (stream, "mach");
Line 1530  print_insn_ppi (field_b, info) Line 1512  print_insn_ppi (field_b, info)
 /* FIXME mvs: movx insns print as ".word 0x%03x", insn & 0xfff  /* FIXME mvs: movx insns print as ".word 0x%03x", insn & 0xfff
    (ie. the upper nibble is missing).  */     (ie. the upper nibble is missing).  */
 int  int
 print_insn_sh (memaddr, info)  print_insn_sh (bfd_vma memaddr, struct disassemble_info *info)
      bfd_vma memaddr;  
      struct disassemble_info *info;  
 {  {
   fprintf_ftype fprintf_fn = info->fprintf_func;    fprintf_function fprintf_fn = info->fprintf_func;
   void *stream = info->stream;    void *stream = info->stream;
   unsigned char insn[4];    unsigned char insn[4];
   unsigned char nibs[8];    unsigned char nibs[8];
Line 2079  print_insn_sh (memaddr, info) Line 2059  print_insn_sh (memaddr, info)
                 }                  }
               if ((*info->symbol_at_address_func) (val, info))                if ((*info->symbol_at_address_func) (val, info))
                 {                  {
                   fprintf_fn (stream, "\t! 0x");                    fprintf_fn (stream, "\t! ");
                   (*info->print_address_func) (val, info);                    (*info->print_address_func) (val, info);
                 }                  }
               else                else

Removed from v.1.1.1.3  
changed lines
  Added in v.1.1.1.7


unix.superglobalmegacorp.com