This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug server/18295] binutils-gdb/gdb/rs6000-tdep.c:1787: bad if expression ?
- From: "simon.marchi at ericsson dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 02 Jan 2018 19:34:56 +0000
- Subject: [Bug server/18295] binutils-gdb/gdb/rs6000-tdep.c:1787: bad if expression ?
- Auto-submitted: auto-generated
- References: <bug-18295-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18295
Simon Marchi <simon.marchi at ericsson dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |simon.marchi at ericsson dot com
--- Comment #2 from Simon Marchi <simon.marchi at ericsson dot com> ---
If we assume the comment is right (we want to check for "stwux rX,r1,rY", where
rX and rY are any register, then I think we should be looking for this
instruction:
0111 11xx xxx0 0001 xxxx x001 0110 111x
where x is bits we don't care about.
The mask should therefore be
1111 1100 0001 1111 0000 0111 1111 1110
or 0xfc1f07fe. The resulting value we should be looking for would be
0111 1100 0000 0001 0000 0001 0110 1110
or 0x7c01016e
The test should then be
(op & 0xfc1f07fe) == 0x7c01016e
I believe other masks are wrong too and should be reviewed. For example, the
one for stdux is 0xfc1f016a, or
1111 1100 0001 1111 0000 0001 0110 1010
According to the ISA manual, bits 21-30 should contain the value 181. The mask
should contain all 1's at these positions, not the value 181. The expected
value, on the right of the ==, should contain the value 181 though.
(For reference I found the instruction set here [1], and just searched for
"stwux").
[1] https://www.ibm.com/developerworks/systems/library/es-archguide-v2.html
--
You are receiving this mail because:
You are on the CC list for the bug.