NetBSD uses signed wchar_t on AArch64. It also wants __LITTLE_ENDIAN__ /

__BIG_ENDIAN__ as on other architectures.

llvm-svn: 200655
This commit is contained in:
Joerg Sonnenberger 2014-02-02 21:55:10 +00:00
parent 4455ffc4d0
commit 9864bd5858
1 changed files with 11 additions and 0 deletions

View File

@ -3375,6 +3375,10 @@ public:
DescriptionString = "e-m:e-i64:64-i128:128-n32:64-S128";
WCharType = UnsignedInt;
if (getTriple().getOS() == llvm::Triple::NetBSD)
WCharType = SignedInt;
else
WCharType = UnsignedInt;
LongDoubleFormat = &llvm::APFloat::IEEEquad;
// AArch64 backend supports 64-bit operations at the moment. In principle
@ -3427,6 +3431,13 @@ public:
if (BigEndian)
Builder.defineMacro("__AARCH_BIG_ENDIAN");
if (getTriple().getOS() == llvm::Triple::NetBSD) {
if (BigEndian)
Builder.defineMacro("__BIG_ENDIAN__");
else
Builder.defineMacro("__LITTLE_ENDIAN__");
}
if (FPU == NeonMode) {
Builder.defineMacro("__ARM_NEON");
// 64-bit NEON supports half, single and double precision operations.