From: Anton Korobeynikov Date: Sat, 8 Sep 2012 08:45:10 +0000 (+0000) Subject: Add some ARM EABI preprocessor builtins tests X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c7f538a10524d02a03b6344915fb7930079ede0;p=clang Add some ARM EABI preprocessor builtins tests git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163467 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Preprocessor/init.c b/test/Preprocessor/init.c index eaf08ca87d..39538dd0b3 100644 --- a/test/Preprocessor/init.c +++ b/test/Preprocessor/init.c @@ -260,6 +260,215 @@ // ARM:#define __WINT_WIDTH__ 32 // ARM:#define __arm 1 // ARM:#define __arm__ 1 + +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-none-linux-gnueabi -target-feature +soft-float -target-feature +soft-float-abi < /dev/null | FileCheck -check-prefix ARMEABISOFTFP %s +// +// ARM-NOT:#define _LP64 +// ARMEABISOFTFP:#define __APCS_32__ 1 +// ARMEABISOFTFP:#define __ARMEL__ 1 +// ARMEABISOFTFP:#define __ARM_ARCH 6 +// ARMEABISOFTFP:#define __ARM_ARCH_6J__ 1 +// ARMEABISOFTFP:#define __ARM_EABI__ 1 +// ARMEABISOFTFP:#define __ARM_PCS 1 +// ARMEABISOFTFP-NOT:#define __ARM_PCS_VFP 1 +// ARMEABISOFTFP:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ +// ARMEABISOFTFP:#define __CHAR16_TYPE__ unsigned short +// ARMEABISOFTFP:#define __CHAR32_TYPE__ unsigned int +// ARMEABISOFTFP:#define __CHAR_BIT__ 8 +// ARMEABISOFTFP:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 +// ARMEABISOFTFP:#define __DBL_DIG__ 15 +// ARMEABISOFTFP:#define __DBL_EPSILON__ 2.2204460492503131e-16 +// ARMEABISOFTFP:#define __DBL_HAS_DENORM__ 1 +// ARMEABISOFTFP:#define __DBL_HAS_INFINITY__ 1 +// ARMEABISOFTFP:#define __DBL_HAS_QUIET_NAN__ 1 +// ARMEABISOFTFP:#define __DBL_MANT_DIG__ 53 +// ARMEABISOFTFP:#define __DBL_MAX_10_EXP__ 308 +// ARMEABISOFTFP:#define __DBL_MAX_EXP__ 1024 +// ARMEABISOFTFP:#define __DBL_MAX__ 1.7976931348623157e+308 +// ARMEABISOFTFP:#define __DBL_MIN_10_EXP__ (-307) +// ARMEABISOFTFP:#define __DBL_MIN_EXP__ (-1021) +// ARMEABISOFTFP:#define __DBL_MIN__ 2.2250738585072014e-308 +// ARMEABISOFTFP:#define __DECIMAL_DIG__ 17 +// ARMEABISOFTFP:#define __FLT_DENORM_MIN__ 1.40129846e-45F +// ARMEABISOFTFP:#define __FLT_DIG__ 6 +// ARMEABISOFTFP:#define __FLT_EPSILON__ 1.19209290e-7F +// ARMEABISOFTFP:#define __FLT_EVAL_METHOD__ 0 +// ARMEABISOFTFP:#define __FLT_HAS_DENORM__ 1 +// ARMEABISOFTFP:#define __FLT_HAS_INFINITY__ 1 +// ARMEABISOFTFP:#define __FLT_HAS_QUIET_NAN__ 1 +// ARMEABISOFTFP:#define __FLT_MANT_DIG__ 24 +// ARMEABISOFTFP:#define __FLT_MAX_10_EXP__ 38 +// ARMEABISOFTFP:#define __FLT_MAX_EXP__ 128 +// ARMEABISOFTFP:#define __FLT_MAX__ 3.40282347e+38F +// ARMEABISOFTFP:#define __FLT_MIN_10_EXP__ (-37) +// ARMEABISOFTFP:#define __FLT_MIN_EXP__ (-125) +// ARMEABISOFTFP:#define __FLT_MIN__ 1.17549435e-38F +// ARMEABISOFTFP:#define __FLT_RADIX__ 2 +// ARMEABISOFTFP:#define __INT16_TYPE__ short +// ARMEABISOFTFP:#define __INT32_TYPE__ int +// ARMEABISOFTFP:#define __INT64_C_SUFFIX__ LL +// ARMEABISOFTFP:#define __INT64_TYPE__ long long int +// ARMEABISOFTFP:#define __INT8_TYPE__ char +// ARMEABISOFTFP:#define __INTMAX_MAX__ 9223372036854775807LL +// ARMEABISOFTFP:#define __INTMAX_TYPE__ long long int +// ARMEABISOFTFP:#define __INTMAX_WIDTH__ 64 +// ARMEABISOFTFP:#define __INTPTR_TYPE__ long int +// ARMEABISOFTFP:#define __INTPTR_WIDTH__ 32 +// ARMEABISOFTFP:#define __INT_MAX__ 2147483647 +// ARMEABISOFTFP:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324 +// ARMEABISOFTFP:#define __LDBL_DIG__ 15 +// ARMEABISOFTFP:#define __LDBL_EPSILON__ 2.2204460492503131e-16 +// ARMEABISOFTFP:#define __LDBL_HAS_DENORM__ 1 +// ARMEABISOFTFP:#define __LDBL_HAS_INFINITY__ 1 +// ARMEABISOFTFP:#define __LDBL_HAS_QUIET_NAN__ 1 +// ARMEABISOFTFP:#define __LDBL_MANT_DIG__ 53 +// ARMEABISOFTFP:#define __LDBL_MAX_10_EXP__ 308 +// ARMEABISOFTFP:#define __LDBL_MAX_EXP__ 1024 +// ARMEABISOFTFP:#define __LDBL_MAX__ 1.7976931348623157e+308 +// ARMEABISOFTFP:#define __LDBL_MIN_10_EXP__ (-307) +// ARMEABISOFTFP:#define __LDBL_MIN_EXP__ (-1021) +// ARMEABISOFTFP:#define __LDBL_MIN__ 2.2250738585072014e-308 +// ARMEABISOFTFP:#define __LITTLE_ENDIAN__ 1 +// ARMEABISOFTFP:#define __LONG_LONG_MAX__ 9223372036854775807LL +// ARMEABISOFTFP:#define __LONG_MAX__ 2147483647L +// ARMEABISOFTFP-NOT:#define __LP64__ +// ARMEABISOFTFP:#define __POINTER_WIDTH__ 32 +// ARMEABISOFTFP:#define __PTRDIFF_TYPE__ int +// ARMEABISOFTFP:#define __PTRDIFF_WIDTH__ 32 +// ARMEABISOFTFP:#define __REGISTER_PREFIX__ +// ARMEABISOFTFP:#define __SCHAR_MAX__ 127 +// ARMEABISOFTFP:#define __SHRT_MAX__ 32767 +// ARMEABISOFTFP:#define __SIG_ATOMIC_WIDTH__ 32 +// ARMEABISOFTFP:#define __SIZEOF_DOUBLE__ 8 +// ARMEABISOFTFP:#define __SIZEOF_FLOAT__ 4 +// ARMEABISOFTFP:#define __SIZEOF_INT__ 4 +// ARMEABISOFTFP:#define __SIZEOF_LONG_DOUBLE__ 8 +// ARMEABISOFTFP:#define __SIZEOF_LONG_LONG__ 8 +// ARMEABISOFTFP:#define __SIZEOF_LONG__ 4 +// ARMEABISOFTFP:#define __SIZEOF_POINTER__ 4 +// ARMEABISOFTFP:#define __SIZEOF_PTRDIFF_T__ 4 +// ARMEABISOFTFP:#define __SIZEOF_SHORT__ 2 +// ARMEABISOFTFP:#define __SIZEOF_SIZE_T__ 4 +// ARMEABISOFTFP:#define __SIZEOF_WCHAR_T__ 4 +// ARMEABISOFTFP:#define __SIZEOF_WINT_T__ 4 +// ARMEABISOFTFP:#define __SIZE_TYPE__ unsigned int +// ARMEABISOFTFP:#define __SIZE_WIDTH__ 32 +// ARMEABISOFTFP:#define __SOFTFP__ 1 +// ARMEABISOFTFP:#define __THUMB_INTERWORK__ 1 +// ARMEABISOFTFP:#define __UINTMAX_TYPE__ long long unsigned int +// ARMEABISOFTFP:#define __USER_LABEL_PREFIX__ +// ARMEABISOFTFP:#define __WCHAR_MAX__ 4294967295U +// ARMEABISOFTFP:#define __WCHAR_TYPE__ unsigned int +// ARMEABISOFTFP:#define __WCHAR_WIDTH__ 32 +// ARMEABISOFTFP:#define __WINT_TYPE__ unsigned int +// ARMEABISOFTFP:#define __WINT_WIDTH__ 32 +// ARMEABISOFTFP:#define __arm 1 +// ARMEABISOFTFP:#define __arm__ 1 + +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-none-linux-gnueabi < /dev/null | FileCheck -check-prefix ARMEABIHARDFP %s +// +// ARM-NOT:#define _LP64 +// ARMEABIHARDFP:#define __APCS_32__ 1 +// ARMEABIHARDFP:#define __ARMEL__ 1 +// ARMEABIHARDFP:#define __ARM_ARCH 6 +// ARMEABIHARDFP:#define __ARM_ARCH_6J__ 1 +// ARMEABIHARDFP:#define __ARM_EABI__ 1 +// ARMEABIHARDFP:#define __ARM_PCS 1 +// ARMEABIHARDFP:#define __ARM_PCS_VFP 1 +// ARMEABIHARDFP:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ +// ARMEABIHARDFP:#define __CHAR16_TYPE__ unsigned short +// ARMEABIHARDFP:#define __CHAR32_TYPE__ unsigned int +// ARMEABIHARDFP:#define __CHAR_BIT__ 8 +// ARMEABIHARDFP:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 +// ARMEABIHARDFP:#define __DBL_DIG__ 15 +// ARMEABIHARDFP:#define __DBL_EPSILON__ 2.2204460492503131e-16 +// ARMEABIHARDFP:#define __DBL_HAS_DENORM__ 1 +// ARMEABIHARDFP:#define __DBL_HAS_INFINITY__ 1 +// ARMEABIHARDFP:#define __DBL_HAS_QUIET_NAN__ 1 +// ARMEABIHARDFP:#define __DBL_MANT_DIG__ 53 +// ARMEABIHARDFP:#define __DBL_MAX_10_EXP__ 308 +// ARMEABIHARDFP:#define __DBL_MAX_EXP__ 1024 +// ARMEABIHARDFP:#define __DBL_MAX__ 1.7976931348623157e+308 +// ARMEABIHARDFP:#define __DBL_MIN_10_EXP__ (-307) +// ARMEABIHARDFP:#define __DBL_MIN_EXP__ (-1021) +// ARMEABIHARDFP:#define __DBL_MIN__ 2.2250738585072014e-308 +// ARMEABIHARDFP:#define __DECIMAL_DIG__ 17 +// ARMEABIHARDFP:#define __FLT_DENORM_MIN__ 1.40129846e-45F +// ARMEABIHARDFP:#define __FLT_DIG__ 6 +// ARMEABIHARDFP:#define __FLT_EPSILON__ 1.19209290e-7F +// ARMEABIHARDFP:#define __FLT_EVAL_METHOD__ 0 +// ARMEABIHARDFP:#define __FLT_HAS_DENORM__ 1 +// ARMEABIHARDFP:#define __FLT_HAS_INFINITY__ 1 +// ARMEABIHARDFP:#define __FLT_HAS_QUIET_NAN__ 1 +// ARMEABIHARDFP:#define __FLT_MANT_DIG__ 24 +// ARMEABIHARDFP:#define __FLT_MAX_10_EXP__ 38 +// ARMEABIHARDFP:#define __FLT_MAX_EXP__ 128 +// ARMEABIHARDFP:#define __FLT_MAX__ 3.40282347e+38F +// ARMEABIHARDFP:#define __FLT_MIN_10_EXP__ (-37) +// ARMEABIHARDFP:#define __FLT_MIN_EXP__ (-125) +// ARMEABIHARDFP:#define __FLT_MIN__ 1.17549435e-38F +// ARMEABIHARDFP:#define __FLT_RADIX__ 2 +// ARMEABIHARDFP:#define __INT16_TYPE__ short +// ARMEABIHARDFP:#define __INT32_TYPE__ int +// ARMEABIHARDFP:#define __INT64_C_SUFFIX__ LL +// ARMEABIHARDFP:#define __INT64_TYPE__ long long int +// ARMEABIHARDFP:#define __INT8_TYPE__ char +// ARMEABIHARDFP:#define __INTMAX_MAX__ 9223372036854775807LL +// ARMEABIHARDFP:#define __INTMAX_TYPE__ long long int +// ARMEABIHARDFP:#define __INTMAX_WIDTH__ 64 +// ARMEABIHARDFP:#define __INTPTR_TYPE__ long int +// ARMEABIHARDFP:#define __INTPTR_WIDTH__ 32 +// ARMEABIHARDFP:#define __INT_MAX__ 2147483647 +// ARMEABIHARDFP:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324 +// ARMEABIHARDFP:#define __LDBL_DIG__ 15 +// ARMEABIHARDFP:#define __LDBL_EPSILON__ 2.2204460492503131e-16 +// ARMEABIHARDFP:#define __LDBL_HAS_DENORM__ 1 +// ARMEABIHARDFP:#define __LDBL_HAS_INFINITY__ 1 +// ARMEABIHARDFP:#define __LDBL_HAS_QUIET_NAN__ 1 +// ARMEABIHARDFP:#define __LDBL_MANT_DIG__ 53 +// ARMEABIHARDFP:#define __LDBL_MAX_10_EXP__ 308 +// ARMEABIHARDFP:#define __LDBL_MAX_EXP__ 1024 +// ARMEABIHARDFP:#define __LDBL_MAX__ 1.7976931348623157e+308 +// ARMEABIHARDFP:#define __LDBL_MIN_10_EXP__ (-307) +// ARMEABIHARDFP:#define __LDBL_MIN_EXP__ (-1021) +// ARMEABIHARDFP:#define __LDBL_MIN__ 2.2250738585072014e-308 +// ARMEABIHARDFP:#define __LITTLE_ENDIAN__ 1 +// ARMEABIHARDFP:#define __LONG_LONG_MAX__ 9223372036854775807LL +// ARMEABIHARDFP:#define __LONG_MAX__ 2147483647L +// ARMEABIHARDFP-NOT:#define __LP64__ +// ARMEABIHARDFP:#define __POINTER_WIDTH__ 32 +// ARMEABIHARDFP:#define __PTRDIFF_TYPE__ int +// ARMEABIHARDFP:#define __PTRDIFF_WIDTH__ 32 +// ARMEABIHARDFP:#define __REGISTER_PREFIX__ +// ARMEABIHARDFP:#define __SCHAR_MAX__ 127 +// ARMEABIHARDFP:#define __SHRT_MAX__ 32767 +// ARMEABIHARDFP:#define __SIG_ATOMIC_WIDTH__ 32 +// ARMEABIHARDFP:#define __SIZEOF_DOUBLE__ 8 +// ARMEABIHARDFP:#define __SIZEOF_FLOAT__ 4 +// ARMEABIHARDFP:#define __SIZEOF_INT__ 4 +// ARMEABIHARDFP:#define __SIZEOF_LONG_DOUBLE__ 8 +// ARMEABIHARDFP:#define __SIZEOF_LONG_LONG__ 8 +// ARMEABIHARDFP:#define __SIZEOF_LONG__ 4 +// ARMEABIHARDFP:#define __SIZEOF_POINTER__ 4 +// ARMEABIHARDFP:#define __SIZEOF_PTRDIFF_T__ 4 +// ARMEABIHARDFP:#define __SIZEOF_SHORT__ 2 +// ARMEABIHARDFP:#define __SIZEOF_SIZE_T__ 4 +// ARMEABIHARDFP:#define __SIZEOF_WCHAR_T__ 4 +// ARMEABIHARDFP:#define __SIZEOF_WINT_T__ 4 +// ARMEABIHARDFP:#define __SIZE_TYPE__ unsigned int +// ARMEABIHARDFP:#define __SIZE_WIDTH__ 32 +// ARMEABIHARDFP-NOT:#define __SOFTFP__ 1 +// ARMEABIHARDFP:#define __THUMB_INTERWORK__ 1 +// ARMEABIHARDFP:#define __UINTMAX_TYPE__ long long unsigned int +// ARMEABIHARDFP:#define __USER_LABEL_PREFIX__ +// ARMEABIHARDFP:#define __WCHAR_MAX__ 4294967295U +// ARMEABIHARDFP:#define __WCHAR_TYPE__ unsigned int +// ARMEABIHARDFP:#define __WCHAR_WIDTH__ 32 +// ARMEABIHARDFP:#define __WINT_TYPE__ unsigned int +// ARMEABIHARDFP:#define __WINT_WIDTH__ 32 +// ARMEABIHARDFP:#define __arm 1 +// ARMEABIHARDFP:#define __arm__ 1 + // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=i386-none-none < /dev/null | FileCheck -check-prefix I386 %s //