r216662 - [ARM] Change default ABI for AArch32 to be "aapcs" (was "apcs-gnu")

Eric Christopher echristo at gmail.com
Fri Dec 5 15:56:09 PST 2014

Hi Oliver,

I'm sorry for the thread archaeology, but I didn't see this when it went in.

> [ARM] Change default ABI for AArch32 to be "aapcs" (was "apcs-gnu")
> The current default abi when no environment is given is "apcs-gnu",
> which is obsolete. This patch changes the default to "aapcs". "aapcs" has
> both
> hard- and soft-float variants, so the -mhard-float, -msoft-float and
> -mfloat-abi= options now all behave as expected when no environment is
> specified in the triple.
Is there an actual compelling reason to make this change? Does it get us
conformity with any other tools?

As a note, you also didn't change the backend to match this which is
causing me some amount of annoyance in trying to get everything to agree.
I'm unraveling it, but it's taking some time. :)

> While writing this I also noticed that a preprocessor test claims to be
> checking darwin, but is actually checking the defaults, which are
> different for darwin.

> -// RUN: %clang -target arm -arch armv7s -x c -E -dM %s -o - | FileCheck
> --check-prefix=ARM-DARWIN-NO-EABI %s
> -// RUN: %clang -target arm -arch armv6m -x c -E -dM %s -o - | FileCheck
> --check-prefix=ARM-DARWIN-NO-EABI %s
> -// RUN: %clang -target arm -arch armv7m -x c -E -dM %s -o - | FileCheck
> --check-prefix=ARM-DARWIN-NO-EABI %s
> -// RUN: %clang -target arm -arch armv7em -x c -E -dM %s -o - | FileCheck
> --check-prefix=ARM-DARWIN-NO-EABI %s
> +// RUN: %clang -target arm-apple-darwin-eabi -arch armv7s -x c -E -dM %s
> -o - | FileCheck --check-prefix=ARM-DARWIN-NO-EABI %s
> +// RUN: %clang -target arm-apple-darwin-eabi -arch armv6m -x c -E -dM %s
> -o - | FileCheck --check-prefix=ARM-DARWIN-EABI %s
> +// RUN: %clang -target arm-apple-darwin-eabi -arch armv7m -x c -E -dM %s
> -o - | FileCheck --check-prefix=ARM-DARWIN-EABI %s
> +// RUN: %clang -target arm-apple-darwin-eabi -arch armv7em -x c -E -dM %s
> -o - | FileCheck --check-prefix=ARM-DARWIN-EABI %s
>  // RUN: %clang -target thumbv7-apple-darwin-eabi -arch armv7 -x c -E -dM
> %s -o - | FileCheck --check-prefix=ARM-DARWIN-NO-EABI %s
>  // ARM-DARWIN-NO-EABI-NOT: #define __ARM_EABI__ 1
> +// ARM-DARWIN-EABI: #define __ARM_EABI__ 1
I don't think this change is quite correct, it would be better to use a
triple that acutally exists and then maybe -mabi instead? cc'ing Tim as he
put that part in originally.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141205/10b51107/attachment.html>

More information about the cfe-commits mailing list