This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
tdep/1541: bit operation compatibility
- From: ysato at users dot sourceforge dot jp
- To: gdb-gnats at sources dot redhat dot com
- Date: 1 Feb 2004 14:16:47 -0000
- Subject: tdep/1541: bit operation compatibility
- Reply-to: ysato at users dot sourceforge dot jp
>Number: 1541
>Category: tdep
>Synopsis: bit operation compatibility
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: patch
>Submitter-Id: net
>Arrival-Date: Sun Feb 01 14:18:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: ysato@users.sourceforge.jp
>Release: gdb 6.0
>Organization:
>Environment:
h8300-elf
>Description:
bset/bclr/btst instruction includes the following descriptions with manual of renesas.
> The bit number can be specified by 3-bit immediate data,
> or by the lower three bits of a general register.
And even true CPU works to a description street.
However, different in action in a simulator.
I think that correct it like a patch.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="bitopfix.diff"
Content-Disposition: inline; filename="bitopfix.diff"
--- compile.c~ 2003-06-19 11:14:14.000000000 +0900
+++ compile.c 2004-02-01 22:52:42.000000000 +0900
@@ -1864,7 +1864,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)) \