This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Disassembly of PowerPC mtspr/mfspr instructions
- From: Ron McCall <ronald dot mccall at snet dot net>
- To: binutils at sources dot redhat dot com
- Date: Fri, 18 Nov 2005 17:34:59 -0800 (PST)
- Subject: Disassembly of PowerPC mtspr/mfspr instructions
Hi,
I was disassembling some object modules with objdump
(version 2.16.1, sparc-solaris2.9 host, powerpc-eabi
target) and saw an unexpected instruction:
$ powerpc-eabi-objdump -D foo.o
[snip]
190: 7d 58 8a a6 mfdc_cst r10
[snip]
The object code should have been for the
MPC7455/MPC7457 which doesn't have a dc_cst register
(MPC860 does). I decoded the instruction manually and
found that it was SPR #568 which is dbat4u on the
MPC745x. I then realized I hadn't told objdump which
architecture to expect so I added that option:
$ powerpc-eabi-objdump -m powerpc:7400 -D foo.o
[snip]
190: 7d 58 8a a6 mfdc_cst r10
[snip]
Same result! The dbat4u register is only present on
some of the 7400 family (e.g. MPC7445, MPC7447,
MPC7455 and MPC7457) which is the most specific
architecture including the MPC7455/MPC7457 that
objdump supports. Still, since the dc_cst register
does not appear to exist in any member of the 7400
family, shouldn't the disassembler recognize this as
dbat4u instead? Note that the latest CVS doesn't do
anything differently in this case.
Ron McCall