[llvm-branch-commits] [cfe-branch] r301085 - Merging r295786:

Brad Smith via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Apr 22 10:05:51 PDT 2017


Author: brad
Date: Sat Apr 22 12:05:51 2017
New Revision: 301085

URL: http://llvm.org/viewvc/llvm-project?rev=301085&view=rev
Log:
Merging r295786:

------------------------------------------------------------------------
r295786 | brad | 2017-02-21 18:13:09 -0500 (Tue, 21 Feb 2017) | 2 lines

Hook up OpenBSD AArch64 support
------------------------------------------------------------------------

Modified:
    cfe/branches/release_40/lib/Basic/Targets.cpp
    cfe/branches/release_40/test/Frontend/gnu-mcount.c
    cfe/branches/release_40/test/Preprocessor/init.c

Modified: cfe/branches/release_40/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_40/lib/Basic/Targets.cpp?rev=301085&r1=301084&r2=301085&view=diff
==============================================================================
--- cfe/branches/release_40/lib/Basic/Targets.cpp (original)
+++ cfe/branches/release_40/lib/Basic/Targets.cpp Sat Apr 22 12:05:51 2017
@@ -5927,7 +5927,8 @@ class AArch64TargetInfo : public TargetI
 public:
   AArch64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
       : TargetInfo(Triple), ABI("aapcs") {
-    if (getTriple().getOS() == llvm::Triple::NetBSD) {
+    if (getTriple().getOS() == llvm::Triple::NetBSD ||
+        getTriple().getOS() == llvm::Triple::OpenBSD) {
       WCharType = SignedInt;
 
       // NetBSD apparently prefers consistency across ARM targets to consistency
@@ -8576,6 +8577,8 @@ static TargetInfo *AllocateTarget(const
       return new LinuxTargetInfo<AArch64leTargetInfo>(Triple, Opts);
     case llvm::Triple::NetBSD:
       return new NetBSDTargetInfo<AArch64leTargetInfo>(Triple, Opts);
+    case llvm::Triple::OpenBSD:
+      return new OpenBSDTargetInfo<AArch64leTargetInfo>(Triple, Opts);
     default:
       return new AArch64leTargetInfo(Triple, Opts);
     }

Modified: cfe/branches/release_40/test/Frontend/gnu-mcount.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_40/test/Frontend/gnu-mcount.c?rev=301085&r1=301084&r2=301085&view=diff
==============================================================================
--- cfe/branches/release_40/test/Frontend/gnu-mcount.c (original)
+++ cfe/branches/release_40/test/Frontend/gnu-mcount.c Sat Apr 22 12:05:51 2017
@@ -61,7 +61,7 @@ int f() {
 // CHECK-ARM-EABI-NETBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
 // CHECK-ARM-EABI-OPENBSD: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="__mcount"{{.*}} }
 // CHECK-ARM-EABI-OPENBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
-// CHECK-ARM64-EABI-OPENBSD: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="mcount"{{.*}} }
+// CHECK-ARM64-EABI-OPENBSD: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="__mcount"{{.*}} }
 // CHECK-ARM64-EABI-OPENBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
 // CHECK-ARM-EABI-MEABI-GNU-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="mcount"{{.*}} }
 // CHECK-ARM-EABI-MEABI-GNU: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }

Modified: cfe/branches/release_40/test/Preprocessor/init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_40/test/Preprocessor/init.c?rev=301085&r1=301084&r2=301085&view=diff
==============================================================================
--- cfe/branches/release_40/test/Preprocessor/init.c (original)
+++ cfe/branches/release_40/test/Preprocessor/init.c Sat Apr 22 12:05:51 2017
@@ -831,6 +831,198 @@
 // AARCH64-NETBSD:#define __WINT_WIDTH__ 32
 // AARCH64-NETBSD:#define __aarch64__ 1
 //
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=aarch64-openbsd < /dev/null | FileCheck -match-full-lines -check-prefix AARCH64-OPENBSD %s
+//
+// AARCH64-OPENBSD:#define _LP64 1
+// AARCH64-OPENBSD-NOT:#define __AARCH64EB__ 1
+// AARCH64-OPENBSD:#define __AARCH64EL__ 1
+// AARCH64-OPENBSD-NOT:#define __AARCH_BIG_ENDIAN 1
+// AARCH64-OPENBSD:#define __ARM_64BIT_STATE 1
+// AARCH64-OPENBSD:#define __ARM_ARCH 8
+// AARCH64-OPENBSD:#define __ARM_ARCH_ISA_A64 1
+// AARCH64-OPENBSD-NOT:#define __ARM_BIG_ENDIAN 1
+// AARCH64-OPENBSD:#define __BIGGEST_ALIGNMENT__ 16
+// AARCH64-OPENBSD:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
+// AARCH64-OPENBSD:#define __CHAR16_TYPE__ unsigned short
+// AARCH64-OPENBSD:#define __CHAR32_TYPE__ unsigned int
+// AARCH64-OPENBSD:#define __CHAR_BIT__ 8
+// AARCH64-OPENBSD:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+// AARCH64-OPENBSD:#define __DBL_DIG__ 15
+// AARCH64-OPENBSD:#define __DBL_EPSILON__ 2.2204460492503131e-16
+// AARCH64-OPENBSD:#define __DBL_HAS_DENORM__ 1
+// AARCH64-OPENBSD:#define __DBL_HAS_INFINITY__ 1
+// AARCH64-OPENBSD:#define __DBL_HAS_QUIET_NAN__ 1
+// AARCH64-OPENBSD:#define __DBL_MANT_DIG__ 53
+// AARCH64-OPENBSD:#define __DBL_MAX_10_EXP__ 308
+// AARCH64-OPENBSD:#define __DBL_MAX_EXP__ 1024
+// AARCH64-OPENBSD:#define __DBL_MAX__ 1.7976931348623157e+308
+// AARCH64-OPENBSD:#define __DBL_MIN_10_EXP__ (-307)
+// AARCH64-OPENBSD:#define __DBL_MIN_EXP__ (-1021)
+// AARCH64-OPENBSD:#define __DBL_MIN__ 2.2250738585072014e-308
+// AARCH64-OPENBSD:#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__
+// AARCH64-OPENBSD:#define __ELF__ 1
+// AARCH64-OPENBSD:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// AARCH64-OPENBSD:#define __FLT_DIG__ 6
+// AARCH64-OPENBSD:#define __FLT_EPSILON__ 1.19209290e-7F
+// AARCH64-OPENBSD:#define __FLT_EVAL_METHOD__ 0
+// AARCH64-OPENBSD:#define __FLT_HAS_DENORM__ 1
+// AARCH64-OPENBSD:#define __FLT_HAS_INFINITY__ 1
+// AARCH64-OPENBSD:#define __FLT_HAS_QUIET_NAN__ 1
+// AARCH64-OPENBSD:#define __FLT_MANT_DIG__ 24
+// AARCH64-OPENBSD:#define __FLT_MAX_10_EXP__ 38
+// AARCH64-OPENBSD:#define __FLT_MAX_EXP__ 128
+// AARCH64-OPENBSD:#define __FLT_MAX__ 3.40282347e+38F
+// AARCH64-OPENBSD:#define __FLT_MIN_10_EXP__ (-37)
+// AARCH64-OPENBSD:#define __FLT_MIN_EXP__ (-125)
+// AARCH64-OPENBSD:#define __FLT_MIN__ 1.17549435e-38F
+// AARCH64-OPENBSD:#define __FLT_RADIX__ 2
+// AARCH64-OPENBSD:#define __INT16_C_SUFFIX__
+// AARCH64-OPENBSD:#define __INT16_FMTd__ "hd"
+// AARCH64-OPENBSD:#define __INT16_FMTi__ "hi"
+// AARCH64-OPENBSD:#define __INT16_MAX__ 32767
+// AARCH64-OPENBSD:#define __INT16_TYPE__ short
+// AARCH64-OPENBSD:#define __INT32_C_SUFFIX__
+// AARCH64-OPENBSD:#define __INT32_FMTd__ "d"
+// AARCH64-OPENBSD:#define __INT32_FMTi__ "i"
+// AARCH64-OPENBSD:#define __INT32_MAX__ 2147483647
+// AARCH64-OPENBSD:#define __INT32_TYPE__ int
+// AARCH64-OPENBSD:#define __INT64_C_SUFFIX__ LL
+// AARCH64-OPENBSD:#define __INT64_FMTd__ "lld"
+// AARCH64-OPENBSD:#define __INT64_FMTi__ "lli"
+// AARCH64-OPENBSD:#define __INT64_MAX__ 9223372036854775807LL
+// AARCH64-OPENBSD:#define __INT64_TYPE__ long long int
+// AARCH64-OPENBSD:#define __INT8_C_SUFFIX__
+// AARCH64-OPENBSD:#define __INT8_FMTd__ "hhd"
+// AARCH64-OPENBSD:#define __INT8_FMTi__ "hhi"
+// AARCH64-OPENBSD:#define __INT8_MAX__ 127
+// AARCH64-OPENBSD:#define __INT8_TYPE__ signed char
+// AARCH64-OPENBSD:#define __INTMAX_C_SUFFIX__ LL
+// AARCH64-OPENBSD:#define __INTMAX_FMTd__ "lld"
+// AARCH64-OPENBSD:#define __INTMAX_FMTi__ "lli"
+// AARCH64-OPENBSD:#define __INTMAX_MAX__ 9223372036854775807LL
+// AARCH64-OPENBSD:#define __INTMAX_TYPE__ long long int
+// AARCH64-OPENBSD:#define __INTMAX_WIDTH__ 64
+// AARCH64-OPENBSD:#define __INTPTR_FMTd__ "ld"
+// AARCH64-OPENBSD:#define __INTPTR_FMTi__ "li"
+// AARCH64-OPENBSD:#define __INTPTR_MAX__ 9223372036854775807L
+// AARCH64-OPENBSD:#define __INTPTR_TYPE__ long int
+// AARCH64-OPENBSD:#define __INTPTR_WIDTH__ 64
+// AARCH64-OPENBSD:#define __INT_FAST16_FMTd__ "hd"
+// AARCH64-OPENBSD:#define __INT_FAST16_FMTi__ "hi"
+// AARCH64-OPENBSD:#define __INT_FAST16_MAX__ 32767
+// AARCH64-OPENBSD:#define __INT_FAST16_TYPE__ short
+// AARCH64-OPENBSD:#define __INT_FAST32_FMTd__ "d"
+// AARCH64-OPENBSD:#define __INT_FAST32_FMTi__ "i"
+// AARCH64-OPENBSD:#define __INT_FAST32_MAX__ 2147483647
+// AARCH64-OPENBSD:#define __INT_FAST32_TYPE__ int
+// AARCH64-OPENBSD:#define __INT_FAST64_FMTd__ "ld"
+// AARCH64-OPENBSD:#define __INT_FAST64_FMTi__ "li"
+// AARCH64-OPENBSD:#define __INT_FAST64_MAX__ 9223372036854775807L
+// AARCH64-OPENBSD:#define __INT_FAST64_TYPE__ long int
+// AARCH64-OPENBSD:#define __INT_FAST8_FMTd__ "hhd"
+// AARCH64-OPENBSD:#define __INT_FAST8_FMTi__ "hhi"
+// AARCH64-OPENBSD:#define __INT_FAST8_MAX__ 127
+// AARCH64-OPENBSD:#define __INT_FAST8_TYPE__ signed char
+// AARCH64-OPENBSD:#define __INT_LEAST16_FMTd__ "hd"
+// AARCH64-OPENBSD:#define __INT_LEAST16_FMTi__ "hi"
+// AARCH64-OPENBSD:#define __INT_LEAST16_MAX__ 32767
+// AARCH64-OPENBSD:#define __INT_LEAST16_TYPE__ short
+// AARCH64-OPENBSD:#define __INT_LEAST32_FMTd__ "d"
+// AARCH64-OPENBSD:#define __INT_LEAST32_FMTi__ "i"
+// AARCH64-OPENBSD:#define __INT_LEAST32_MAX__ 2147483647
+// AARCH64-OPENSD:#define __INT_LEAST32_TYPE__ int
+// AARCH64-OPENBSD:#define __INT_LEAST64_FMTd__ "ld"
+// AARCH64-OPENBSD:#define __INT_LEAST64_FMTi__ "li"
+// AARCH64-OPENBSD:#define __INT_LEAST64_MAX__ 9223372036854775807L
+// AARCH64-OPENBSD:#define __INT_LEAST64_TYPE__ long int
+// AARCH64-OPENBSD:#define __INT_LEAST8_FMTd__ "hhd"
+// AARCH64-OPENBSD:#define __INT_LEAST8_FMTi__ "hhi"
+// AARCH64-OPENBSD:#define __INT_LEAST8_MAX__ 127
+// AARCH64-OPENBSD:#define __INT_LEAST8_TYPE__ signed char
+// AARCH64-OPENBSD:#define __INT_MAX__ 2147483647
+// AARCH64-OPENBSD:#define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L
+// AARCH64-OPENBSD:#define __LDBL_DIG__ 33
+// AARCH64-OPENBSD:#define __LDBL_EPSILON__ 1.92592994438723585305597794258492732e-34L
+// AARCH64-OPENBSD:#define __LDBL_HAS_DENORM__ 1
+// AARCH64-OPENBSD:#define __LDBL_HAS_INFINITY__ 1
+// AARCH64-OPENBSD:#define __LDBL_HAS_QUIET_NAN__ 1
+// AARCH64-OPENBSD:#define __LDBL_MANT_DIG__ 113
+// AARCH64-OPENBSD:#define __LDBL_MAX_10_EXP__ 4932
+// AARCH64-OPENBSD:#define __LDBL_MAX_EXP__ 16384
+// AARCH64-OPENBSD:#define __LDBL_MAX__ 1.18973149535723176508575932662800702e+4932L
+// AARCH64-OPENBSD:#define __LDBL_MIN_10_EXP__ (-4931)
+// AARCH64-OPENBSD:#define __LDBL_MIN_EXP__ (-16381)
+// AARCH64-OPENBSD:#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
+// AARCH64-OPENBSD:#define __LITTLE_ENDIAN__ 1
+// AARCH64-OPENBSD:#define __LONG_LONG_MAX__ 9223372036854775807LL
+// AARCH64-OPENBSD:#define __LONG_MAX__ 9223372036854775807L
+// AARCH64-OPENBSD:#define __LP64__ 1
+// AARCH64-OPENBSD:#define __OpenBSD__ 1
+// AARCH64-OPENBSD:#define __POINTER_WIDTH__ 64
+// AARCH64-OPENBSD:#define __PTRDIFF_TYPE__ long int
+// AARCH64-OPENBSD:#define __PTRDIFF_WIDTH__ 64
+// AARCH64-OPENBSD:#define __SCHAR_MAX__ 127
+// AARCH64-OPENBSD:#define __SHRT_MAX__ 32767
+// AARCH64-OPENBSD:#define __SIG_ATOMIC_MAX__ 2147483647
+// AARCH64-OPENBSD:#define __SIG_ATOMIC_WIDTH__ 32
+// AARCH64-OPENBSD:#define __SIZEOF_DOUBLE__ 8
+// AARCH64-OPENBSD:#define __SIZEOF_FLOAT__ 4
+// AARCH64-OPENBSD:#define __SIZEOF_INT__ 4
+// AARCH64-OPENBSD:#define __SIZEOF_LONG_DOUBLE__ 16
+// AARCH64-OPENBSD:#define __SIZEOF_LONG_LONG__ 8
+// AARCH64-OPENBSD:#define __SIZEOF_LONG__ 8
+// AARCH64-OPENBSD:#define __SIZEOF_POINTER__ 8
+// AARCH64-OPENBSD:#define __SIZEOF_PTRDIFF_T__ 8
+// AARCH64-OPENBSD:#define __SIZEOF_SHORT__ 2
+// AARCH64-OPENBSD:#define __SIZEOF_SIZE_T__ 8
+// AARCH64-OPENBSD:#define __SIZEOF_WCHAR_T__ 4
+// AARCH64-OPENBSD:#define __SIZEOF_WINT_T__ 4
+// AARCH64-OPENBSD:#define __SIZE_MAX__ 18446744073709551615UL
+// AARCH64-OPENBSD:#define __SIZE_TYPE__ long unsigned int
+// AARCH64-OPENBSD:#define __SIZE_WIDTH__ 64
+// AARCH64-OPENBSD:#define __UINT16_C_SUFFIX__
+// AARCH64-OPENBSD:#define __UINT16_MAX__ 65535
+// AARCH64-OPENBSD:#define __UINT16_TYPE__ unsigned short
+// AARCH64-OPENBSD:#define __UINT32_C_SUFFIX__ U
+// AARCH64-OPENBSD:#define __UINT32_MAX__ 4294967295U
+// AARCH64-OPENBSD:#define __UINT32_TYPE__ unsigned int
+// AARCH64-OPENBSD:#define __UINT64_C_SUFFIX__ ULL
+// AARCH64-OPENBSD:#define __UINT64_MAX__ 18446744073709551615ULL
+// AARCH64-OPENBSD:#define __UINT64_TYPE__ long long unsigned int
+// AARCH64-OPENBSD:#define __UINT8_C_SUFFIX__
+// AARCH64-OPENBSD:#define __UINT8_MAX__ 255
+// AARCH64-OPENBSD:#define __UINT8_TYPE__ unsigned char
+// AARCH64-OPENBSD:#define __UINTMAX_C_SUFFIX__ ULL
+// AARCH64-OPENBSD:#define __UINTMAX_MAX__ 18446744073709551615ULL
+// AARCH64-OPENBSD:#define __UINTMAX_TYPE__ long long unsigned int
+// AARCH64-OPENBSD:#define __UINTMAX_WIDTH__ 64
+// AARCH64-OPENBSD:#define __UINTPTR_MAX__ 18446744073709551615UL
+// AARCH64-OPENBSD:#define __UINTPTR_TYPE__ long unsigned int
+// AARCH64-OPENBSD:#define __UINTPTR_WIDTH__ 64
+// AARCH64-OPENBSD:#define __UINT_FAST16_MAX__ 65535
+// AARCH64-OPENBSD:#define __UINT_FAST16_TYPE__ unsigned short
+// AARCH64-OPENBSD:#define __UINT_FAST32_MAX__ 4294967295U
+// AARCH64-OPENBSD:#define __UINT_FAST32_TYPE__ unsigned int
+// AARCH64-OPENBSD:#define __UINT_FAST64_MAX__ 18446744073709551615UL
+// AARCH64-OPENBSD:#define __UINT_FAST64_TYPE__ long unsigned int
+// AARCH64-OPENBSD:#define __UINT_FAST8_MAX__ 255
+// AARCH64-OPENBSD:#define __UINT_FAST8_TYPE__ unsigned char
+// AARCH64-OPENBSD:#define __UINT_LEAST16_MAX__ 65535
+// AARCH64-OPENBSD:#define __UINT_LEAST16_TYPE__ unsigned short
+// AARCH64-OPENBSD:#define __UINT_LEAST32_MAX__ 4294967295U
+// AARCH64-OPENBSD:#define __UINT_LEAST32_TYPE__ unsigned int
+// AARCH64-OPENBSD:#define __UINT_LEAST64_MAX__ 18446744073709551615UL
+// AARCH64-OPENBSD:#define __UINT_LEAST64_TYPE__ long unsigned int
+// AARCH64-OPENBSD:#define __UINT_LEAST8_MAX__ 255
+// AARCH64-OPENBSD:#define __UINT_LEAST8_TYPE__ unsigned char
+// AARCH64-OPENBSD:#define __USER_LABEL_PREFIX__
+// AARCH64-OPENBSD:#define __WCHAR_MAX__ 2147483647
+// AARCH64-OPENBSD:#define __WCHAR_TYPE__ int
+// AARCH64-OPENBSD:#define __WCHAR_WIDTH__ 32
+// AARCH64-OPENBSD:#define __WINT_TYPE__ int
+// AARCH64-OPENBSD:#define __WINT_WIDTH__ 32
+// AARCH64-OPENBSD:#define __aarch64__ 1
+//
 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=aarch64-freebsd11 < /dev/null | FileCheck -match-full-lines -check-prefix AARCH64-FREEBSD %s
 //
 // AARCH64-FREEBSD:#define _LP64 1
@@ -8523,6 +8715,7 @@
 // LANAI: #define __lanai__ 1
 //
 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=amd64-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=aarch64-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s
 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-unknown-openbsd6.1-gnueabi < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s
 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=i386-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s
 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=sparc64-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s




More information about the llvm-branch-commits mailing list