This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Re: [PATCH] h8300 sim bitops fix
- From: Yoshinori Sato <ysato at users dot sourceforge dot jp>
- To: gdb-patches at sourceware dot org
- Date: Wed, 19 Jul 2006 15:32:06 +0900
- Subject: [commit] Re: [PATCH] h8300 sim bitops fix
- References: <m2hd1ln314.wl%ysato@users.sourceforge.jp>
I did commit.
At Thu, 13 Jul 2006 20:43:35 +0900,
Yoshinori Sato wrote:
>
> Only 3 bits of low order are effective for bit address of bit-operation.
> But every bit becomes effective currently.
> Bit address is more than 8 and becomes an illegal result.
>
> Index: ChangeLog
> ===================================================================
> RCS file: /cvs/src/src/sim/h8300/ChangeLog,v
> retrieving revision 1.55
> diff -u -r1.55 ChangeLog
> --- ChangeLog 13 Jun 2006 08:06:48 -0000 1.55
> +++ ChangeLog 13 Jul 2006 11:30:22 -0000
> @@ -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: compile.c
> ===================================================================
> RCS file: /cvs/src/src/sim/h8300/compile.c,v
> retrieving revision 1.42
> diff -u -r1.42 compile.c
> --- compile.c 28 Jun 2004 19:26:37 -0000 1.42
> +++ compile.c 13 Jul 2006 11:30:23 -0000
> @@ -1018,7 +1018,7 @@
> 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 @@
> 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 @@
> 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)) \
>
--
Yoshinori Sato
<ysato@users.sourceforge.jp>