This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] libffi darwin structure implementation (PPC)
- From: Andreas Tobler <toa at pop dot agri dot ch>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 30 Aug 2003 21:19:42 +0200
- Subject: Re: [patch] libffi darwin structure implementation (PPC)
- References: <8C45441F-DAE6-11D7-8915-000393A6D2F2@physics.uc.edu>
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