Disassembly of PowerPC mtspr/mfspr instructions
Ron McCall
ronald.mccall@snet.net
Sat Nov 19 01:35:00 GMT 2005
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
More information about the Binutils
mailing list