This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]