[Gambas-devel] 64 bits branch merge done

Benoit Minisini gambas at ...1...
Fri Jan 18 23:14:34 CET 2008


On vendredi 18 janvier 2008, Daniel Campos wrote:
> > If you type "libffi" in google, the first answer is the project home
> > site. There is no documentation about libffi, you must look into a sparse
> > README file and into the source code.
> >
> > But the problem is not libffi, but Gambas there! I don't know yet how to
> > make support for structures and callbacks, but I will think about it. It
> > will need a lot of work.
>
> I already did that work for 32 bits systems, I can explore the way to
> do it in 64 bits if you want, btw, Is there in gcc any definition I
> can use to determine a 64 bits compilation?
>
> Daniel
>

As for structure support, this needs big changes in the compiler, in the 
interpreter, in the object file format, and maybe in the bytecode. There is 
support for C-like structures in libffi, so passing them to a function will 
not be a problem.

As for callback support, I have no idea how you could do that correctly.

Note that libffi uses assembly for calling functions, so that it can deal with 
the different ABI of 64 bits systems and 32 bits systems (Hopefully, there is 
only one ABI for 64 bits systems, but several for 32 bits systems). 

And there is no support for callbacks in libffi. So please explain me how you 
implemented them, without using assembly! :-)

Regards,

-- 
Benoit Minisini




More information about the Devel mailing list