This is the mail archive of the gcc-patches@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: [patch] libffi darwin structure implementation (PPC)


Andrew Pinski wrote:
On Saturday, Aug 30, 2003, at 01:27 US/Eastern, Andreas Tobler wrote:

Andrew Pinski wrote:

Comments are welcome.

Only two comments/suggestions.


+ tramp[1] = 0x4800000d; /* bl 10 <trampoline_initial+0x10> */


Like this?

tramp[1] = 0x429f000d; /* bcl- 20,4*cr7+so,0x10 */


Yes like this and


On Saturday, Aug 30, 2003, at 06:09 US/Eastern, Andrew Haley wrote:


Andreas Tobler writes:

Ok, have to figure out what you mean exactly. I guess you mean 'casts' ?


I think he means

tramp[3] = (unsigned int) ffi_closure_ASM; /* function */

ok, tested and it seems ok.


For my clarification, one should NOT modify the LEFT side of an assignment? Also called lvalue, ONE should only modify (cast) the rvalue. Right?

Also, unsigned int does work on a 32 bit machine, is it sufficient on a 64 bit machine too? Or should it be unsigned long or just long?

And last, a side note, libffi uses these '*(void **) &tramp[3] = (void *)closure' tweaks a lot. (me thinks a lot of 'how does the other one do it' code) ((also on my side))


Thanks for you suggestions and hints.


Regards,
Andreas


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