This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[rfc/rfa:arm] rewrite arm_push_arguments() as a single two passloop
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 29 May 2002 23:10:24 -0400
- Subject: [rfc/rfa:arm] rewrite arm_push_arguments() as a single two passloop
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