* Switch ARM, SPARC and i386 to generic dummy frames (PC_IN_CALL_DUMMY)?
@ 2002-04-14 7:51 Andrew Cagney
2002-04-14 8:18 ` Daniel Jacobowitz
2002-04-15 0:51 ` Peter.Schauer
0 siblings, 2 replies; 8+ messages in thread
From: Andrew Cagney @ 2002-04-14 7:51 UTC (permalink / raw)
To: gdb
Hello,
If I remember one of those unwritten ``grand plans'' correctly, the
intent is to have all targets switched to ``generic dummy frames''. True?
Among other things, generic dummy frames do not save/restore registers
on the target stack (instead they are cached locally) and this should
improve the overall performance of an inferior function call.
Anyway, the thing that prompts this is PC_IN_CALL_DUMMY(PC, SP, FP).
There are several implementations. Only two:
- generic: looks for the FP in the list of dummy frames
- stack: looks for PC in [FP..SP)
require the SP/FP parameters. I've a patch to fix the first one (search
for the PC). If the ARM, SPARC and i386 can switch to generic dummy
frames then those parameters can be eliminated and all calls simplified.
Any chance of having these converted?
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Switch ARM, SPARC and i386 to generic dummy frames (PC_IN_CALL_DUMMY)?
2002-04-14 7:51 Switch ARM, SPARC and i386 to generic dummy frames (PC_IN_CALL_DUMMY)? Andrew Cagney
@ 2002-04-14 8:18 ` Daniel Jacobowitz
2002-04-14 8:33 ` Andrew Cagney
2002-04-15 0:51 ` Peter.Schauer
1 sibling, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-04-14 8:18 UTC (permalink / raw)
To: gdb
On Sun, Apr 14, 2002 at 10:51:36AM -0400, Andrew Cagney wrote:
> Hello,
>
> If I remember one of those unwritten ``grand plans'' correctly, the
> intent is to have all targets switched to ``generic dummy frames''. True?
>
> Among other things, generic dummy frames do not save/restore registers
> on the target stack (instead they are cached locally) and this should
> improve the overall performance of an inferior function call.
>
> Anyway, the thing that prompts this is PC_IN_CALL_DUMMY(PC, SP, FP).
> There are several implementations. Only two:
>
> - generic: looks for the FP in the list of dummy frames
> - stack: looks for PC in [FP..SP)
>
> require the SP/FP parameters. I've a patch to fix the first one (search
> for the PC). If the ARM, SPARC and i386 can switch to generic dummy
> frames then those parameters can be eliminated and all calls simplified.
Wait a second. Switch to searching for the PC? Does that work
reliably if the PC being searched for is in more than one dummy frame?
I guess it does for PC_IN_CALL_DUMMY (a predicate), but does anything
else use the search code?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Switch ARM, SPARC and i386 to generic dummy frames (PC_IN_CALL_DUMMY)?
2002-04-14 8:18 ` Daniel Jacobowitz
@ 2002-04-14 8:33 ` Andrew Cagney
2002-04-14 8:53 ` Daniel Jacobowitz
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Cagney @ 2002-04-14 8:33 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
> On Sun, Apr 14, 2002 at 10:51:36AM -0400, Andrew Cagney wrote:
>
>> Hello,
>>
>> If I remember one of those unwritten ``grand plans'' correctly, the
>> intent is to have all targets switched to ``generic dummy frames''. True?
>>
>> Among other things, generic dummy frames do not save/restore registers
>> on the target stack (instead they are cached locally) and this should
>> improve the overall performance of an inferior function call.
>>
>> Anyway, the thing that prompts this is PC_IN_CALL_DUMMY(PC, SP, FP).
>> There are several implementations. Only two:
>>
>> - generic: looks for the FP in the list of dummy frames
>> - stack: looks for PC in [FP..SP)
>>
>> require the SP/FP parameters. I've a patch to fix the first one (search
>> for the PC). If the ARM, SPARC and i386 can switch to generic dummy
>> frames then those parameters can be eliminated and all calls simplified.
>
>
> Wait a second. Switch to searching for the PC? Does that work
> reliably if the PC being searched for is in more than one dummy frame?
> I guess it does for PC_IN_CALL_DUMMY (a predicate), but does anything
> else use the search code?
Sorry, you've lost me. BTW, the line:
>> - generic: looks for the FP in the list of dummy frames
isn't a typo.
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Switch ARM, SPARC and i386 to generic dummy frames (PC_IN_CALL_DUMMY)?
2002-04-14 8:33 ` Andrew Cagney
@ 2002-04-14 8:53 ` Daniel Jacobowitz
2002-04-14 9:40 ` Andrew Cagney
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-04-14 8:53 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
On Sun, Apr 14, 2002 at 11:33:49AM -0400, Andrew Cagney wrote:
> >On Sun, Apr 14, 2002 at 10:51:36AM -0400, Andrew Cagney wrote:
> >
> >>Hello,
> >>
> >>If I remember one of those unwritten ``grand plans'' correctly, the
> >>intent is to have all targets switched to ``generic dummy frames''. True?
> >>
> >>Among other things, generic dummy frames do not save/restore registers
> >>on the target stack (instead they are cached locally) and this should
> >>improve the overall performance of an inferior function call.
> >>
> >>Anyway, the thing that prompts this is PC_IN_CALL_DUMMY(PC, SP, FP).
> >>There are several implementations. Only two:
> >>
> >>- generic: looks for the FP in the list of dummy frames
> >>- stack: looks for PC in [FP..SP)
> >>
> >>require the SP/FP parameters. I've a patch to fix the first one (search
> >>for the PC). If the ARM, SPARC and i386 can switch to generic dummy
> >>frames then those parameters can be eliminated and all calls simplified.
> >
> >
> >Wait a second. Switch to searching for the PC? Does that work
> >reliably if the PC being searched for is in more than one dummy frame?
> >I guess it does for PC_IN_CALL_DUMMY (a predicate), but does anything
> >else use the search code?
>
> Sorry, you've lost me. BTW, the line:
> >> - generic: looks for the FP in the list of dummy frames
> isn't a typo.
Certainly. But didn't you say "fix the first one (search for the PC)"?
My concern is if we have multiple call frames from (to?) the same PC.
That's easy enough to do; I've done it by accident plenty of times.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Switch ARM, SPARC and i386 to generic dummy frames (PC_IN_CALL_DUMMY)?
2002-04-14 8:53 ` Daniel Jacobowitz
@ 2002-04-14 9:40 ` Andrew Cagney
2002-04-14 10:17 ` Daniel Jacobowitz
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Cagney @ 2002-04-14 9:40 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
> Sorry, you've lost me. BTW, the line:
>
>> >> - generic: looks for the FP in the list of dummy frames
>
>> isn't a typo.
>
>
> Certainly. But didn't you say "fix the first one (search for the PC)"?
>
> My concern is if we have multiple call frames from (to?) the same PC.
> That's easy enough to do; I've done it by accident plenty of times.
Sorry, you've still lost me.
PC_IN_CALL_DUMMY() returns non-zero if the PC is in a ``call dummy''
(any call dummy). Having multiple call dummies at the same address is
normal (as with AT_ENTRY).
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Switch ARM, SPARC and i386 to generic dummy frames (PC_IN_CALL_DUMMY)?
2002-04-14 9:40 ` Andrew Cagney
@ 2002-04-14 10:17 ` Daniel Jacobowitz
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-04-14 10:17 UTC (permalink / raw)
To: gdb
On Sun, Apr 14, 2002 at 12:40:04PM -0400, Andrew Cagney wrote:
> >Sorry, you've lost me. BTW, the line:
> >
> >>>> - generic: looks for the FP in the list of dummy frames
> >
> >>isn't a typo.
> >
> >
> >Certainly. But didn't you say "fix the first one (search for the PC)"?
> >
> >My concern is if we have multiple call frames from (to?) the same PC.
> >That's easy enough to do; I've done it by accident plenty of times.
>
> Sorry, you've still lost me.
>
> PC_IN_CALL_DUMMY() returns non-zero if the PC is in a ``call dummy''
> (any call dummy). Having multiple call dummies at the same address is
> normal (as with AT_ENTRY).
That answers my question then :)
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Switch ARM, SPARC and i386 to generic dummy frames (PC_IN_CALL_DUMMY)?
2002-04-14 7:51 Switch ARM, SPARC and i386 to generic dummy frames (PC_IN_CALL_DUMMY)? Andrew Cagney
2002-04-14 8:18 ` Daniel Jacobowitz
@ 2002-04-15 0:51 ` Peter.Schauer
2002-04-15 6:42 ` Andrew Cagney
1 sibling, 1 reply; 8+ messages in thread
From: Peter.Schauer @ 2002-04-15 0:51 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
AFAIK, generic dummy frames work only with the AT_ENTRY mechanism.
But for 32 bit SPARC ABI we need ON_STACK, see
http://sourceware.cygnus.com/ml/gdb/1999-q4/msg00064.html
http://sources.redhat.com/ml/gdb-patches/2000-05/msg00041.html
for an explanation.
I am afraid that we have to extend the generic dummy frame code to allow
ON_STACK, if we want to use generic dummy frames for SPARC.
> Hello,
>
> If I remember one of those unwritten ``grand plans'' correctly, the
> intent is to have all targets switched to ``generic dummy frames''. True?
>
> Among other things, generic dummy frames do not save/restore registers
> on the target stack (instead they are cached locally) and this should
> improve the overall performance of an inferior function call.
>
> Anyway, the thing that prompts this is PC_IN_CALL_DUMMY(PC, SP, FP).
> There are several implementations. Only two:
>
> - generic: looks for the FP in the list of dummy frames
> - stack: looks for PC in [FP..SP)
>
> require the SP/FP parameters. I've a patch to fix the first one (search
> for the PC). If the ARM, SPARC and i386 can switch to generic dummy
> frames then those parameters can be eliminated and all calls simplified.
>
> Any chance of having these converted?
>
> Andrew
>
>
>
--
Peter Schauer pes@regent.e-technik.tu-muenchen.de
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-04-15 13:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-14 7:51 Switch ARM, SPARC and i386 to generic dummy frames (PC_IN_CALL_DUMMY)? Andrew Cagney
2002-04-14 8:18 ` Daniel Jacobowitz
2002-04-14 8:33 ` Andrew Cagney
2002-04-14 8:53 ` Daniel Jacobowitz
2002-04-14 9:40 ` Andrew Cagney
2002-04-14 10:17 ` Daniel Jacobowitz
2002-04-15 0:51 ` Peter.Schauer
2002-04-15 6:42 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox