compile.c (OBITOP): Bit address mask low three bit.
authorYoshinori Sato <ysato@users.sourceforge.jp>
Wed, 19 Jul 2006 06:27:04 +0000 (06:27 +0000)
committerYoshinori Sato <ysato@users.sourceforge.jp>
Wed, 19 Jul 2006 06:27:04 +0000 (06:27 +0000)
compile.c (decode): Fix warning.

sim/h8300/ChangeLog
sim/h8300/compile.c

index 3e54a28e689109a5f58c85cafb89f308b5255a17..e22177066392e4848fe9d96c39a6605d27d35115 100644 (file)
@@ -1,3 +1,8 @@
+2006-07-13  Yoshinori Sato <ysato@users.sourceforge.jp>
+
+       * compile.c (OBITOP): Bit address mask low three bit.
+       * compile.c (decode): Fix warning.
+
 2006-06-13  Richard Earnshaw  <rearnsha@arm.com>
 
        * configure: Regenerated.
index 3c11e8263d2c8d26f1ef0e589b3cc724ab61f373..0d307577ae332b753205f5b8ac11d8646985356c 100644 (file)
@@ -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))             \