This is the mail archive of the
mailing list for the GCC project.
Re: RE?: [patch]: Sandro's GCJ on Darwin/i386 p atches pt.2
On 25/set/2006, at 18:25, Bonzini Paolo wrote:
ffi.h automatically defines @TARGET@. You would need to define a
new target, as it is done for X86_WIN32, and then turn:
#ifndef X86_WIN32 -> #ifdef X86
#ifdef X86_WIN32 -> #ifdef X86_WIN32
#if defined X86_WIN32 || defined __APPLE__ -> #ifndef X86
#ifdef __APPLE__ -> #ifdef X86_DARWIN
Ok, I understand. Should be not a big problem if you know where to
put your hands :)
would keep __APPLE__ because it is not defining the ABI, but the
characteristics of the system assembler. It may be nice to change
with a preprocessor macro though, like this:
Yes, this would be nice too.
Also, WRT to the sysv.S changes, what happens if a program was
declaring a function to return char or short (excuse the possibly
dumb question)? Thanks for all your work!
My changes should not have altered the libffi behaviour in this
cases. All that I had to do is implement the never-used 1 and 2 bytes
struct returns that are triggered by the C part but not handled by
the ASM part (this is a fork from the standard SYSV specs, that
usually mandates all struct returns on the stack). The C part didn't
need to be changed so much because in some other architectures struct
return in registers are already used. All that was missing in sysv.S
is the handling of the FFI_TYPE_SINT8 and FFI_TYPE_SINT16 cases.