[PATCH] FreeBSD AArch64 support

Andrew Turner andrew at fubar.geek.nz
Thu Nov 13 07:45:07 PST 2014


On Thu, 13 Nov 2014 06:45:05 -0800
Tim Northover <t.p.northover at gmail.com> wrote:

> Hi Andrew,
> 
> Thanks for adding the tests.
> 
> > These should be as described in the AArch64 ABI documentation. There
> > should be no need to differ without a good reason.
> 
> That's good (I'm not a fan of putting custom tweaks on the documented
> ABI, really, though it does happen -- Darwin always has signed char,
> for example, no matter what the CPU ABI says).
> 
> But I don't think the documented ABI covers everything, and it also
> explicitly leaves a few choices to the platform. The key one you'll
> want to check is the AAPCS:
> http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055b/IHI0055B_aapcs64.pdf.
> 
> The choices I'm aware of within that document are:
>    + what is size_t?
>    + What's the status of x18?
>    + What frame records do you mandate?
>    + How big is wchar_t?

FreeBSD on 64-bit architectures uses an LP64 data model. This will
make size_t an unsigned long and wchar_t an unsigned word which would
make it an unsigned int.

We don't have any requirements for the x18 register or frame records so
I'm happy to use the defaults.

> But it's been a while so I may have missed some. Exactly which type
> gets to be uint64_t is also ABI-visible (E.g. in C++ name manglings)
> but not specifically mentioned.
> 
> I've looked at the choices in the test, and they all seem sensible to
> me so go ahead and commit if you like.

I am unable to commit this as I don't have an account.

Abdrew



More information about the cfe-commits mailing list