[cfe-dev] Hack for FreeBSD ABI support

Daniel Dunbar daniel at zuster.org
Tue Aug 18 00:03:33 PDT 2009


On Mon, Aug 17, 2009 at 12:02 PM, David Chisnall<csdavec at swansea.ac.uk> wrote:
> On 17 Aug 2009, at 19:45, Jonathan Gray wrote:
>
>> you can of course derive this information from looking at the gcc
>> config dir, but the short answer is
>>
>> beos-elf.h:#define DEFAULT_PCC_STRUCT_RETURN 1
>> linux.h:#define DEFAULT_PCC_STRUCT_RETURN 1
>> lynx.h:#define DEFAULT_PCC_STRUCT_RETURN 1
>> nto.h:#define DEFAULT_PCC_STRUCT_RETURN 1
>> netbsd-elf.h:#define DEFAULT_PCC_STRUCT_RETURN 1
>>
>> cygming.h:#define DEFAULT_PCC_STRUCT_RETURN 0
>> darwin.h:#define DEFAULT_PCC_STRUCT_RETURN 0
>> freebsd.h:#define DEFAULT_PCC_STRUCT_RETURN 0
>> netware.h:#define DEFAULT_PCC_STRUCT_RETURN 0
>> openbsd.h:#define DEFAULT_PCC_STRUCT_RETURN 0
>
> Thanks, I've updated the code so that it now sets the second flag if
> the target triple contains one of cygwin, mingw, netware,freebsd,
> openbsd, or darwin and set the first flag if it contains darwin.
>
> Anyone want to object before I commit?

There is a typo (isPPCStructReturnABI -> isPCCStructReturnABI).

I don't know enough of the history to know what kinds of variations to
expect, but it would be good to do some substantial testing (e.g.,
ABITest and the relevant parts of the gcc test suite) to verify that
the results match gcc.

For example, shouldReturnTypeInRegister has some more special
conditions for vectors, and the "single element" struct rules are
quirky enough that I assumed they were a Darwin oddity.

 - Daniel

> David
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>



More information about the cfe-dev mailing list