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]

Re: Registerized function parameters and related things.


On Tue, Dec 03, 2002 at 01:45:05AM +0100, Fabio Alemagna wrote:
> Geez, I already explained the solution, and it's the one I want to
> implement. I asked where to start from, that's all.

I have to say that I find this extremely naieve.  There is 
NO WAY to define a GENERALIZED mapping between processors.
Why?  Because there are too many different features.

If you want a specific mapping between 68k and x86 then yes
that is possible.  It would be a terrible hack, and would
never be considered for inclusion in gcc proper, but it would
be possible.

The best I can tell you is to look at the functions that
call FUNCTION_ARG and related macros.

Enjoy.


That said, I still don't see why you couldn't use something
like libffi.  The emulator cannot call into native code without
knowing what the native code does.  If that weren't the case,
there would be no indication that the call was valid.  If it
the emulator knows what native code does, then it must know
what the types of the arguments are, at which point you've
got the information you said you don't have.



r~


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