This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Getting more information about functions arguments/locals inmachine description


Hi everybody, 

I somehow asked this question already a few weeks ago, but unfortunately
didn't advance in this area. A little clue or pointer would be of great
help! :) 

My problem is that I need to "declare" every argument or local variable
used by a function. Yet the FUNCTION_PROLOGUE allows me to know how many
bytes I need to allocate on the stack for them, but I need more precise
information. I need to know how many arguments/local variables have
being used and their starting offset on the stack (their size would
actually help too), so I can generate something like: 

function foo: 
  .Arg a1, a2, a3 
  .Local l1, l2, l3 

With this information, it'd be quite straightforward to to intercept the
insns accessing to the local variables/arguments and output the label of
the variable instead of an indirect reference. Yet, I still have no clue
on how to get this information. 

It seemed to me, that the data structures for per-function information
(as mentionned in the manual) could help, as you can define your own
additional data structure for functions. However, having looked
carefully in function.h and others relevant files, I see no place where
I could retrieve such information. 

Is there a possible trick here? Can someone enlighten me? :)

Thank you for your time,
Alex.
-- 
http://www.gnurou.org


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