public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* disassembly options
@ 2007-09-04 16:09 Robin Getz
  2007-09-07 14:52 ` Nick Clifton
  0 siblings, 1 reply; 20+ messages in thread
From: Robin Getz @ 2007-09-04 16:09 UTC (permalink / raw)
  To: binutils

Today in objdump, MIPS supports a -M reg-names=ARCH option, where the 
disassembler will print CPU-specific register names as appropriate for the 
selected CPU or architecture.

I was wondering if it made sense to extend this so it not only named core 
registers, but memory mapped registers as well...

For example, in Blackfin when we want to access a memory mapped register, we 
load the address into a pointer register, and do a read or write. Today the 
Disassembler puts out something like:

    20e4:       4a e1 c0 ff     P2.H = 0xffc0   /* 0xffc01f24 */;
    20e8:       0a e1 00 00     P2.L = 0x0      /* 0xffc00000 */;
    20ec:       10 95           R0 = W[P2] (Z);

Since we don't have 32-bit atomic loads, we need to load up each 16-bit half 
into a register, and then dereference it.

It would be nice to have something that automatically told me that the MMR at 
0xffc00000 == "PLL_CTL", (the name actually means something - and is 
referenced in the standard processor documentation), and get something that 
looks like:

    20e4:       4a e1 c0 ff     P2.H = 0xffc0   /* 0xffc01f24 */;
    20e8:       0a e1 00 00     P2.L = 0x0      /* 0xffc00000 */;
    20ec:       10 95           R0 = W[P2] (Z)  /* PLL_CTL */;

Thoughts? I thought if this was a nice thing for all SoC devices (ARM, MIPS, 
Blackfin, AVR32, FRV, SH, PPC, etc), I would try to do things in as generic 
way as possible. If everyone thinks this is stupid, then I will continue to 
look things up by hand...

-Robin

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2007-09-18 11:03 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-04 16:09 disassembly options Robin Getz
2007-09-07 14:52 ` Nick Clifton
2007-09-07 14:59   ` Dave Korn
2007-09-07 15:01     ` Mike Frysinger
2007-09-07 15:24       ` Dave Korn
2007-09-07 15:32         ` Mike Frysinger
2007-09-07 15:43         ` Nick Clifton
2007-09-08  4:14     ` Robin Getz
2007-09-09 21:34       ` Dave Korn
2007-09-18  8:16         ` Robin Getz
2007-09-17 12:08       ` Nick Clifton
2007-09-17 12:25         ` Daniel Jacobowitz
2007-09-17 17:47         ` Mike Frysinger
2007-09-17 19:50           ` Daniel Jacobowitz
2007-09-18  5:58         ` Robin Getz
2007-09-18 10:39           ` Nick Clifton
2007-09-18 12:00             ` Robin Getz
2007-09-08  4:37   ` Robin Getz
2007-09-08  5:23     ` Mike Frysinger
2007-09-09  4:00       ` Robin Getz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).