]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/h8300/compile.c
This commit was manufactured by cvs2svn to create branch 'gdb_7_0-branch'.
[thirdparty/binutils-gdb.git] / sim / h8300 / compile.c
index 3c11e8263d2c8d26f1ef0e589b3cc724ab61f373..a7e2694e3354defafe76132f3f2c1988f0cd94a7 100644 (file)
@@ -599,7 +599,7 @@ decode (SIM_DESC sd, int addr, unsigned char *data, decoded_inst *dst)
   /* Find the exact opcode/arg combo.  */
   for (q = h8_opcodes; q->name; q++)
     {
-      op_type *nib = q->data.nib;
+      const op_type *nib = q->data.nib;
       unsigned int len = 0;
 
       if ((q->available == AV_H8SX && !h8300sxmode) ||
@@ -924,7 +924,7 @@ decode (SIM_DESC sd, int addr, unsigned char *data, decoded_inst *dst)
 #endif
                  /* Fill in the args.  */
                  {
-                   op_type *args = q->args.nib;
+                   const op_type *args = q->args.nib;
                    int hadone = 0;
                    int nargs;
 
@@ -1018,7 +1018,7 @@ decode (SIM_DESC sd, int addr, unsigned char *data, decoded_inst *dst)
                            p->literal = 0;
                            if (OP_KIND (q->how) == O_JSR ||
                                OP_KIND (q->how) == O_JMP)
-                             if (lvalue (sd, p->type, p->reg, &p->type))
+                             if (lvalue (sd, p->type, p->reg, (unsigned int *)&p->type))
                                goto end;
                          }
                        else if ((x & MODE) == ABS)
@@ -1050,7 +1050,7 @@ decode (SIM_DESC sd, int addr, unsigned char *data, decoded_inst *dst)
                            p->literal = cst[opnum];
                            if (OP_KIND (q->how) == O_JSR ||
                                OP_KIND (q->how) == O_JMP)
-                             if (lvalue (sd, p->type, p->reg, &p->type))
+                             if (lvalue (sd, p->type, p->reg, (unsigned int *)&p->type))
                                goto end;
                          }
                        else if ((x & MODE) == PCREL)
@@ -1891,7 +1891,7 @@ case O (name, SB):                                \
       goto end;                                        \
   if (fetch (sd, &code->src, &tmp))            \
     goto end;                                  \
-  m = 1 << tmp;                                        \
+  m = 1 << (tmp & 7);                          \
   op;                                          \
   if (s)                                       \
     if (store (sd, &code->dst,ea))             \
@@ -2810,7 +2810,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
                ind_arg_len = 0;
 
                /* The size of the commandline argument.  */
-               ind_arg_len = strlen (h8_get_cmdline_arg (sd, i) + 1);
+               ind_arg_len = strlen (h8_get_cmdline_arg (sd, i)) + 1;
 
                /* The total size of the command line string.  */
                size_cmdline += ind_arg_len;