additional vector function to improve register fetch performance
Andrew Cagney
ac131313@cygnus.com
Thu Dec 14 16:59:00 GMT 2000
"J.T. Conklin" wrote:
> Might be changed to:
>
> prefetch_sp ();
> prefetch_fp ();
> prefetch_pc ();
> prefetch_register (R0_REGNUM);
> sp = read_sp ();
> fp = read_fp ();
> pc = read_pc ();
> r0 = read_register (R0_REGNUM);
>
> (I'm assuming the prefetch* functions are added to regcache.c to do
> whatever housekeeping is required and call the target vector
> function).
To follow on from Stephane's comments. I have a feeling that this would
make things unnecessarily complicated.
Looking at the remote case and the ``T'' packet. There isn't any reason
why the ``T'' packet doesn't just return all of the registers. Across a
TCP connection that should have zero marginal cost.
The other thing to consider is given a request for reg N, the target
could satisfy it by fetching an entire block of registers M<=N<=O and
entering them all into the cache.
In away the ``G'' (registers) packet does this - you ask for one
register and get back a block. Unfortunatly the block is very very
large and fixed.
Andrew
More information about the Gdb
mailing list