public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Three register layers
@ 2003-06-22 21:58 Andrew Cagney
  0 siblings, 0 replies; only message in thread
From: Andrew Cagney @ 2003-06-22 21:58 UTC (permalink / raw)
  To: gdb

Hello,

I think the recent MIPS register discussion has identified a technical 
limitation with the current register/frame structure.

At present there are two register layers:

	cooked/frame
	   |
	  raw

where the cooked/frame registers are constructed from raw registers and 
memory.

To implement the registers proposed in Kevin's patch in a way that will 
work with CFI, I think a third layer is needed vis:

	user
	 |
	cooked/frame
	 |
	raw

The user visible registers being constructed from the frame/abi 
registers, and the frame/abi registers being (eventually) constructed 
from raw registers / memory.  If this isn't done, each frame will need 
to know how to unwind not just the ABI registers but also these extra 
user registers - making for much complexity.

I should note that this is, sort of, already in place.  The builtin 
registers ($fp, $sp, $ps) are layered above the frame registers vis:

	builtin-regs
	    |
	cooked/frame
	    |
	   raw

with this in place I think it becomes possible to convert the somewhat 
messy MIPS and SH.

As an example, the MIPS thread proposed a $fpr0 that is constructed from 
the ABI register pair: $cop0r0 ||| $cop0r1.  The frame unwinders would 
know how to unwind the ABI based $cop0r0 and $cop0r1, but not the user 
visible composite $fpr0.

thoughts,
Andrew

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-06-22 21:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-22 21:58 Three register layers Andrew Cagney

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).