Diff for /qemu/cris-dis.c between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2018/04/24 16:47:18 version 1.1.1.2, 2018/04/24 16:50:34
Line 26 Line 26
 //#include "libiberty.h"  //#include "libiberty.h"
   
   
   void *qemu_malloc(size_t len); /* can't include qemu-common.h here */
   
 #define FALSE 0  #define FALSE 0
 #define TRUE 1  #define TRUE 1
 #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)  #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)
Line 1401  get_opcode_entry (unsigned int insn, Line 1403  get_opcode_entry (unsigned int insn,
   /* Allocate and clear the opcode-table.  */    /* Allocate and clear the opcode-table.  */
   if (opc_table == NULL)    if (opc_table == NULL)
     {      {
       opc_table = malloc (65536 * sizeof (opc_table[0]));        opc_table = qemu_malloc (65536 * sizeof (opc_table[0]));
       if (opc_table == NULL)  
         return NULL;  
   
       memset (opc_table, 0, 65536 * sizeof (const struct cris_opcode *));        memset (opc_table, 0, 65536 * sizeof (const struct cris_opcode *));
   
       dip_prefixes        dip_prefixes
         = malloc (65536 * sizeof (const struct cris_opcode **));          = qemu_malloc (65536 * sizeof (const struct cris_opcode **));
       if (dip_prefixes == NULL)  
         return NULL;  
   
       memset (dip_prefixes, 0, 65536 * sizeof (dip_prefixes[0]));        memset (dip_prefixes, 0, 65536 * sizeof (dip_prefixes[0]));
   
       bdapq_m1_prefixes        bdapq_m1_prefixes
         = malloc (65536 * sizeof (const struct cris_opcode **));          = qemu_malloc (65536 * sizeof (const struct cris_opcode **));
       if (bdapq_m1_prefixes == NULL)  
         return NULL;  
   
       memset (bdapq_m1_prefixes, 0, 65536 * sizeof (bdapq_m1_prefixes[0]));        memset (bdapq_m1_prefixes, 0, 65536 * sizeof (bdapq_m1_prefixes[0]));
   
       bdapq_m2_prefixes        bdapq_m2_prefixes
         = malloc (65536 * sizeof (const struct cris_opcode **));          = qemu_malloc (65536 * sizeof (const struct cris_opcode **));
       if (bdapq_m2_prefixes == NULL)  
         return NULL;  
   
       memset (bdapq_m2_prefixes, 0, 65536 * sizeof (bdapq_m2_prefixes[0]));        memset (bdapq_m2_prefixes, 0, 65536 * sizeof (bdapq_m2_prefixes[0]));
   
       bdapq_m4_prefixes        bdapq_m4_prefixes
         = malloc (65536 * sizeof (const struct cris_opcode **));          = qemu_malloc (65536 * sizeof (const struct cris_opcode **));
       if (bdapq_m4_prefixes == NULL)  
         return NULL;  
   
       memset (bdapq_m4_prefixes, 0, 65536 * sizeof (bdapq_m4_prefixes[0]));        memset (bdapq_m4_prefixes, 0, 65536 * sizeof (bdapq_m4_prefixes[0]));
   
       rest_prefixes        rest_prefixes
         = malloc (65536 * sizeof (const struct cris_opcode **));          = qemu_malloc (65536 * sizeof (const struct cris_opcode **));
       if (rest_prefixes == NULL)  
         return NULL;  
   
       memset (rest_prefixes, 0, 65536 * sizeof (rest_prefixes[0]));        memset (rest_prefixes, 0, 65536 * sizeof (rest_prefixes[0]));
     }      }
Line 2625  print_insn_cris_generic (bfd_vma memaddr Line 2615  print_insn_cris_generic (bfd_vma memaddr
      If we can't get any data, or we do not get enough data, we print       If we can't get any data, or we do not get enough data, we print
      the error message.  */       the error message.  */
   
   for (nbytes = MAX_BYTES_PER_CRIS_INSN; nbytes > 0; nbytes -= 2)    nbytes = info->buffer_length;
     {    if (nbytes > MAX_BYTES_PER_CRIS_INSN)
       status = (*info->read_memory_func) (memaddr, buffer, nbytes, info);            nbytes = MAX_BYTES_PER_CRIS_INSN;
       if (status == 0)    status = (*info->read_memory_func) (memaddr, buffer, nbytes, info);  
         break;  
     }  
   
   /* If we did not get all we asked for, then clear the rest.    /* If we did not get all we asked for, then clear the rest.
      Hopefully this makes a reproducible result in case of errors.  */       Hopefully this makes a reproducible result in case of errors.  */

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


unix.superglobalmegacorp.com