Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfc/rfa:arm] rewrite arm_push_arguments() as a single  two pass loop
@ 2002-05-29 20:32 Andrew Cagney
  2002-05-30  8:07 ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2002-05-29 20:32 UTC (permalink / raw)
  To: gdb-patches

Hello,

The code to push arguments onto the stack, for many ABI's, involves two 
passes:

1. iterate over the arguments. compute the location/offset of each, 
accumulate results (to compute the size of the stack frame).

2. iterate over the arguments, compute the location/offset of each, 
store accordingly

The attached patch rewrites arm_push_arguments() so that the two passes 
are combined into a single two-pass for-loop.  The only difference 
between the first and second pass of the loop is that the second pass 
stores values.  The intent is to make the maintenance of the function 
easier - e.g. adding FP support would now involve one addition 
(currently it involves two).

Thoughts, on the general approach?

It also adds the command ``set debug arm'' which will cause the code to 
print out the arguments as they are pushed.

Ok for arm?
Andrew


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

end of thread, other threads:[~2002-06-12 21:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-29 20:32 [rfc/rfa:arm] rewrite arm_push_arguments() as a single two pass loop Andrew Cagney
2002-05-30  8:07 ` Andrew Cagney
2002-05-30 11:15   ` Kevin Buettner
2002-06-12  6:12   ` Richard Earnshaw
2002-06-12 14:48     ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox