diff options
Diffstat (limited to 'test/Preprocessor')
-rw-r--r-- | test/Preprocessor/aarch64-target-features.c | 125 | ||||
-rw-r--r-- | test/Preprocessor/c17.c | 1 | ||||
-rw-r--r-- | test/Preprocessor/feature_tests.c | 1 | ||||
-rw-r--r-- | test/Preprocessor/has_attribute.cpp | 24 | ||||
-rw-r--r-- | test/Preprocessor/hexagon-predefines.c | 24 | ||||
-rw-r--r-- | test/Preprocessor/include-nonalpha-no-crash.c | 3 | ||||
-rw-r--r-- | test/Preprocessor/include-pth.c | 3 | ||||
-rw-r--r-- | test/Preprocessor/init.c | 65 | ||||
-rw-r--r-- | test/Preprocessor/pragma.c | 8 | ||||
-rw-r--r-- | test/Preprocessor/predefined-arch-macros.c | 111 |
10 files changed, 304 insertions, 61 deletions
diff --git a/test/Preprocessor/aarch64-target-features.c b/test/Preprocessor/aarch64-target-features.c index 58bc7192d7..1616b7fc8a 100644 --- a/test/Preprocessor/aarch64-target-features.c +++ b/test/Preprocessor/aarch64-target-features.c @@ -93,16 +93,20 @@ // RUN: %clang -target aarch64-none-linux-gnu -march=armv8.2a+dotprod -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-DOTPROD %s // CHECK-DOTPROD: __ARM_FEATURE_DOTPROD 1 -// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.2-a+nofp16fml+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s -// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.2-a+nofp16+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s -// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.2-a+fp16+nofp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s -// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8-a+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s -// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8-a+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s -// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.4-a+nofp16fml+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s -// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.4-a+nofp16+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s -// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.4-a+fp16+nofp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s -// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.4-a+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s -// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.4-a+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s +// On ARMv8.2-A and above, +fp16fml implies +fp16. +// On ARMv8.4-A and above, +fp16 implies +fp16fml. +// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.2-a+nofp16fml+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s +// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.2-a+nofp16+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-FML --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s +// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.2-a+fp16+nofp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s +// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8-a+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-FML --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s +// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8-a+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s +// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.4-a+nofp16fml+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-FML --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s +// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.4-a+nofp16+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-FML --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s +// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.4-a+fp16+nofp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s +// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.4-a+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-FML --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s +// RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.4-a+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-FML --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s +// CHECK-FULLFP16-FML: #define __ARM_FEATURE_FP16FML 1 +// CHECK-FULLFP16-NOFML-NOT: #define __ARM_FEATURE_FP16FML 1 // CHECK-FULLFP16-VECTOR-SCALAR: #define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 1 // CHECK-FULLFP16-VECTOR-SCALAR: #define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 1 // CHECK-FULLFP16-VECTOR-SCALAR: #define __ARM_FP 0xE @@ -114,6 +118,7 @@ // RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8-a+fp16+nosimd -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SCALAR %s // RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.4-a+fp16fml+nosimd -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SCALAR %s // RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.4-a+fp16+nosimd -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SCALAR %s +// CHECK-FULLFP16-SCALAR-NOT: #define __ARM_FEATURE_FP16FML 1 // CHECK-FULLFP16-SCALAR: #define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 1 // CHECK-FULLFP16-SCALAR-NOT: #define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 1 // CHECK-FULLFP16-SCALAR: #define __ARM_FP 0xE @@ -127,10 +132,11 @@ // RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.4-a+nofp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s // RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.4-a+nofp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s // RUN: %clang -target aarch64-none-linux-gnueabi -march=armv8.4-a+fp16fml+nofp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s +// CHECK-FULLFP16-NOFML-VECTOR-SCALAR-NOT: #define __ARM_FEATURE_FP16FML 1 // CHECK-FULLFP16-NOFML-VECTOR-SCALAR-NOT: #define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 1 // CHECK-FULLFP16-NOFML-VECTOR-SCALAR-NOT: #define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 1 -// CHECK-FULLFP16-NOFML-VECTOR-SCALAR: #define __ARM_FP 0xE -// CHECK-FULLFP16-NOFML-VECTOR-SCALAR: #define __ARM_FP16_FORMAT_IEEE 1 +// CHECK-FULLFP16-NOFML-VECTOR-SCALAR: #define __ARM_FP 0xE +// CHECK-FULLFP16-NOFML-VECTOR-SCALAR: #define __ARM_FP16_FORMAT_IEEE 1 // ================== Check whether -mtune accepts mixed-case features. // RUN: %clang -target aarch64 -mtune=CYCLONE -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MTUNE-CYCLONE %s @@ -170,6 +176,101 @@ // CHECK-MARCH-2: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "-fp-armv8" "-target-feature" "-neon" "-target-feature" "-crc" "-target-feature" "-crypto" // CHECK-MARCH-3: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "-neon" +// Check +sm4: +// +// RUN: %clang -target aarch64 -march=armv8.2a+sm4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-SM4 %s +// CHECK-SM4: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8.2a" "-target-feature" "+sm4" +// +// Check +sha3: +// +// RUN: %clang -target aarch64 -march=armv8.2a+sha3 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-SHA3 %s +// CHECK-SHA3: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8.2a" "-target-feature" "+sha3" +// +// Check +sha2: +// +// RUN: %clang -target aarch64 -march=armv8.3a+sha2 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-SHA2 %s +// CHECK-SHA2: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8.{{.}}a" "-target-feature" "+sha2" +// +// Check +aes: +// +// RUN: %clang -target aarch64 -march=armv8.3a+aes -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-AES %s +// CHECK-AES: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8.{{.}}a" "-target-feature" "+aes" +// +// Check -sm4: +// +// RUN: %clang -target aarch64 -march=armv8.2a+noSM4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SM4 %s +// CHECK-NO-SM4: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8.2a" "-target-feature" "-sm4" +// +// Check -sha3: +// +// RUN: %clang -target aarch64 -march=armv8.2a+noSHA3 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SHA3 %s +// CHECK-NO-SHA3: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8.2a" "-target-feature" "-sha3" +// +// Check -sha2: +// +// RUN: %clang -target aarch64 -march=armv8.2a+noSHA2 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SHA2 %s +// CHECK-NO-SHA2: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8.2a" "-target-feature" "-sha2" +// +// Check -aes: +// +// RUN: %clang -target aarch64 -march=armv8.2a+noAES -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-NO-AES %s +// CHECK-NO-AES: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8.2a" "-target-feature" "-aes" +// +// +// Arch <= ARMv8.3: crypto = sha2 + aes +// ------------------------------------- +// +// Check +crypto: +// +// RUN: %clang -target aarch64 -march=armv8a+crypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CRYPTO83 %s +// RUN: %clang -target aarch64 -march=armv8.1a+crypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CRYPTO83 %s +// RUN: %clang -target aarch64 -march=armv8.2a+crypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CRYPTO83 %s +// RUN: %clang -target aarch64 -march=armv8.3a+crypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CRYPTO83 %s +// RUN: %clang -target aarch64 -march=armv8a+crypto+nocrypto+crypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CRYPTO83 %s +// CHECK-CRYPTO83: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+crypto" "-target-feature" "+sha2" "-target-feature" "+aes" +// +// Check -crypto: +// +// RUN: %clang -target aarch64 -march=armv8a+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-NOCRYPTO8A %s +// RUN: %clang -target aarch64 -march=armv8.1a+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-NOCRYPTO81 %s +// RUN: %clang -target aarch64 -march=armv8.2a+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-NOCRYPTO82 %s +// RUN: %clang -target aarch64 -march=armv8.3a+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-NOCRYPTO82 %s +// RUN: %clang -target aarch64 -march=armv8.3a+nocrypto+crypto+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-NOCRYPTO82 %s + +// CHECK-NOCRYPTO8A: "-target-feature" "+neon" "-target-feature" "-crypto" "-target-feature" "-sha2" "-target-feature" "-aes" "-target-abi" "aapcs" +// CHECK-NOCRYPTO81: "-target-feature" "+neon" "-target-feature" "+v8.1a" "-target-feature" "-crypto" "-target-feature" "-sha2" "-target-feature" "-aes" "-target-abi" "aapcs" +// CHECK-NOCRYPTO82: "-target-feature" "+neon" "-target-feature" "+v8.{{.}}a" "-target-feature" "-crypto" "-target-feature" "-sha2" "-target-feature" "-aes" "-target-feature" "-sm4" "-target-feature" "-sha3" "-target-abi" "aapcs" +// +// Check +crypto -sha2 -aes: +// +// RUN: %clang -target aarch64 -march=armv8.1a+crypto+nosha2+noaes -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CRYPTO83-NOSHA2-NOAES %s +// CHECK-CRYPTO83-NOSHA2-NOAES-NOT: "-target-feature" "+sha2" "-target-feature" "+aes" +// +// Check -crypto +sha2 +aes: +// +// RUN: %clang -target aarch64 -march=armv8.1a+nocrypto+sha2+aes -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-NOCRYPTO83-SHA2-AES %s +// CHECK-NOCRYPTO83-SHA2-AES: "-target-feature" "+sha2" "-target-feature" "+aes" +// +// +// Arch >= ARMv8.4: crypto = sm4 + sha3 + sha2 + aes +// -------------------------------------------------- +// +// Check +crypto: +// +// RUN: %clang -target aarch64 -march=armv8.4a+crypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CRYPTO84 %s +// CHECK-CRYPTO84: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8.4a" "-target-feature" "+crypto" "-target-feature" "+sm4" "-target-feature" "+sha3" "-target-feature" "+sha2" "-target-feature" "+aes" +// +// Check -crypto: +// +// RUN: %clang -target aarch64 -march=armv8.4a+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-NOCRYPTO84 %s +// CHECK-NOCRYPTO84-NOT: "-target-feature" "+crypto" "-target-feature" "+sm4" "-target-feature" "+sha3" "-target-feature" "+sha2" "-target-feature" "+aes" +// +// Check +crypto -sm4 -sha3: +// +// RUN: %clang -target aarch64 -march=armv8.4a+crypto+sm4+nosm4+sha3+nosha3 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CRYPTO84-NOSMSHA %s +// CHECK-CRYPTO84-NOSMSHA: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8.4a" "-target-feature" "+crypto" "-target-feature" "-sm4" "-target-feature" "-sha3" "-target-feature" "+sha2" "-target-feature" "+aes" +// +// // RUN: %clang -target aarch64 -mcpu=cyclone+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-1 %s // RUN: %clang -target aarch64 -mcpu=cyclone+crypto+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-1 %s // RUN: %clang -target aarch64 -mcpu=generic+crc -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-2 %s diff --git a/test/Preprocessor/c17.c b/test/Preprocessor/c17.c index c610e84f98..7031eec11e 100644 --- a/test/Preprocessor/c17.c +++ b/test/Preprocessor/c17.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify -std=c17 %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c18 %s // expected-no-diagnostics _Static_assert(__STDC_VERSION__ == 201710L, "Incorrect __STDC_VERSION__"); diff --git a/test/Preprocessor/feature_tests.c b/test/Preprocessor/feature_tests.c index 52a1f17cdd..c2fbd11c97 100644 --- a/test/Preprocessor/feature_tests.c +++ b/test/Preprocessor/feature_tests.c @@ -14,6 +14,7 @@ !__has_builtin(__builtin_convertvector) || \ !__has_builtin(__builtin_trap) || \ !__has_builtin(__c11_atomic_init) || \ + !__has_builtin(__builtin_launder) || \ !__has_feature(attribute_analyzer_noreturn) || \ !__has_feature(attribute_overloadable) #error Clang should have these diff --git a/test/Preprocessor/has_attribute.cpp b/test/Preprocessor/has_attribute.cpp index 2cfa005fb0..91f3501666 100644 --- a/test/Preprocessor/has_attribute.cpp +++ b/test/Preprocessor/has_attribute.cpp @@ -21,14 +21,34 @@ int has_clang_fallthrough_2(); #endif -// The scope cannot be bracketed with double underscores. +// The scope cannot be bracketed with double underscores unless it is +// for gnu or clang. +// CHECK: does_not_have___gsl___suppress +#if !__has_cpp_attribute(__gsl__::suppress) + int does_not_have___gsl___suppress(); +#endif + +// We do somewhat support the __clang__ vendor namespace, but it is a +// predefined macro and thus we encourage users to use _Clang instead. +// Because of this, we do not support __has_cpp_attribute for that +// vendor namespace. // CHECK: does_not_have___clang___fallthrough #if !__has_cpp_attribute(__clang__::fallthrough) int does_not_have___clang___fallthrough(); #endif -// Test that C++11, target-specific attributes behave properly. +// CHECK: does_have_Clang_fallthrough +#if __has_cpp_attribute(_Clang::fallthrough) + int does_have_Clang_fallthrough(); +#endif +// CHECK: has_gnu_const +#if __has_cpp_attribute(__gnu__::__const__) + int has_gnu_const(); +#endif
+
+// Test that C++11, target-specific attributes behave properly.
+
// CHECK: does_not_have_mips16 #if !__has_cpp_attribute(gnu::mips16) int does_not_have_mips16(); diff --git a/test/Preprocessor/hexagon-predefines.c b/test/Preprocessor/hexagon-predefines.c index fe87262ae6..1d122c0e82 100644 --- a/test/Preprocessor/hexagon-predefines.c +++ b/test/Preprocessor/hexagon-predefines.c @@ -34,6 +34,8 @@ // CHECK-V65: #define __hexagon__ 1 // The HVX flags are explicitly defined by the driver. +// For v60,v62,v65 - 64B mode is default +// For v66 and future archs - 128B is default // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv60 \ // RUN: -target-feature +hvxv60 -target-feature +hvx-length64b %s | FileCheck \ // RUN: %s -check-prefix CHECK-V60HVX-64B @@ -55,3 +57,25 @@ // CHECK-V60HVX-128B: #define __HVX_LENGTH__ 128 // CHECK-V60HVX-128B: #define __HVX__ 1 // CHECK-V60HVX-128B: #define __hexagon__ 1 + +// RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv66 \ +// RUN: -target-feature +hvxv66 -target-feature +hvx-length64b %s | FileCheck \ +// RUN: %s -check-prefix CHECK-V66HVX-64B +// CHECK-V66HVX-64B: #define __HEXAGON_ARCH__ 66 +// CHECK-V66HVX-64B: #define __HEXAGON_V66__ 1 +// CHECK-V66HVX-64B-NOT: #define __HVXDBL__ 1 +// CHECK-V66HVX-64B: #define __HVX_ARCH__ 66 +// CHECK-V66HVX-64B: #define __HVX_LENGTH__ 64 +// CHECK-V66HVX-64B: #define __HVX__ 1 +// CHECK-V66HVX-64B: #define __hexagon__ 1 + +// RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv66 \ +// RUN: -target-feature +hvxv66 -target-feature +hvx-length128b %s | FileCheck \ +// RUN: %s -check-prefix CHECK-V66HVX-128B +// CHECK-V66HVX-128B: #define __HEXAGON_ARCH__ 66 +// CHECK-V66HVX-128B: #define __HEXAGON_V66__ 1 +// CHECK-V66HVX-128B: #define __HVXDBL__ 1 +// CHECK-V66HVX-128B: #define __HVX_ARCH__ 66 +// CHECK-V66HVX-128B: #define __HVX_LENGTH__ 128 +// CHECK-V66HVX-128B: #define __HVX__ 1 +// CHECK-V66HVX-128B: #define __hexagon__ 1 diff --git a/test/Preprocessor/include-nonalpha-no-crash.c b/test/Preprocessor/include-nonalpha-no-crash.c new file mode 100644 index 0000000000..31c1348f02 --- /dev/null +++ b/test/Preprocessor/include-nonalpha-no-crash.c @@ -0,0 +1,3 @@ +// RUN: %clang_cc1 %s -verify + +#include "./" // expected-error {{'./' file not found}} diff --git a/test/Preprocessor/include-pth.c b/test/Preprocessor/include-pth.c deleted file mode 100644 index e1d6685d1f..0000000000 --- a/test/Preprocessor/include-pth.c +++ /dev/null @@ -1,3 +0,0 @@ -// RUN: %clang_cc1 -emit-pth %s -o %t -// RUN: %clang_cc1 -include-pth %t %s -E | grep 'file_to_include' | count 2 -#include "file_to_include.h" diff --git a/test/Preprocessor/init.c b/test/Preprocessor/init.c index 5a93f3b1fa..ff48b11868 100644 --- a/test/Preprocessor/init.c +++ b/test/Preprocessor/init.c @@ -47,21 +47,21 @@ // CXX11:#define __cplusplus 201103L // CXX11:#define __private_extern__ extern // -// +// // RUN: %clang_cc1 -x c++ -std=c++98 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix CXX98 %s -// +// // CXX98:#define __GNUG__ {{.*}} // CXX98:#define __GXX_RTTI 1 // CXX98:#define __GXX_WEAK__ 1 // CXX98:#define __cplusplus 199711L // CXX98:#define __private_extern__ extern // -// +// // RUN: %clang_cc1 -fdeprecated-macro -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix DEPRECATED %s // // DEPRECATED:#define __DEPRECATED 1 // -// +// // RUN: %clang_cc1 -std=c99 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix C99 %s // // C99:#define __STDC_VERSION__ 199901L @@ -71,7 +71,7 @@ // C99-NOT: __GXX_WEAK__ // C99-NOT: __cplusplus // -// +// // RUN: %clang_cc1 -std=c11 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix C11 %s // RUN: %clang_cc1 -std=c1x -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix C11 %s // RUN: %clang_cc1 -std=iso9899:2011 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix C11 %s @@ -86,7 +86,7 @@ // C11-NOT: __GXX_WEAK__ // C11-NOT: __cplusplus // -// +// // RUN: %clang_cc1 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix COMMON %s // // COMMON:#define __CONSTANT_CFSTRINGS__ 1 @@ -113,7 +113,7 @@ // RUN: %clang_cc1 -E -dM -triple=x86_64-pc-linux-gnu < /dev/null | FileCheck -match-full-lines -check-prefix C-DEFAULT %s // RUN: %clang_cc1 -E -dM -triple=x86_64-apple-darwin < /dev/null | FileCheck -match-full-lines -check-prefix C-DEFAULT %s // RUN: %clang_cc1 -E -dM -triple=armv7a-apple-darwin < /dev/null | FileCheck -match-full-lines -check-prefix C-DEFAULT %s -// +// // C-DEFAULT:#define __STDC_VERSION__ 201112L // // RUN: %clang_cc1 -ffreestanding -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix FREESTANDING %s @@ -158,12 +158,12 @@ // GXX98:#define __cplusplus 199711L // GXX98:#define __private_extern__ extern // -// +// // RUN: %clang_cc1 -std=iso9899:199409 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix C94 %s // // C94:#define __STDC_VERSION__ 199409L // -// +// // RUN: %clang_cc1 -fms-extensions -triple i686-pc-win32 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix MSEXT %s // // MSEXT-NOT:#define __STDC__ @@ -185,7 +185,7 @@ // MSEXT-CXX-NOWCHAR-NOT:#define _WCHAR_T_DEFINED 1 // MSEXT-CXX-NOWCHAR:#define __BOOL_DEFINED 1 // -// +// // RUN: %clang_cc1 -x objective-c -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix OBJC %s // // OBJC:#define OBJC_NEW_PROPERTIES 1 @@ -197,7 +197,7 @@ // // OBJCGC:#define __OBJC_GC__ 1 // -// +// // RUN: %clang_cc1 -x objective-c -fobjc-exceptions -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix NONFRAGILE %s // // NONFRAGILE:#define OBJC_ZEROCOST_EXCEPTIONS 1 @@ -246,9 +246,9 @@ // // PASCAL:#define __PASCAL_STRINGS__ 1 // -// +// // RUN: %clang_cc1 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix SCHAR %s -// +// // SCHAR:#define __STDC__ 1 // SCHAR-NOT:#define __UNSIGNED_CHAR__ // SCHAR:#define __clang__ 1 @@ -1331,10 +1331,10 @@ // AARCH64-DARWIN: #define __INT_FAST32_FMTi__ "i" // AARCH64-DARWIN: #define __INT_FAST32_MAX__ 2147483647 // AARCH64-DARWIN: #define __INT_FAST32_TYPE__ int -// AARCH64-DARWIN: #define __INT_FAST64_FMTd__ "ld" -// AARCH64-DARWIN: #define __INT_FAST64_FMTi__ "li" -// AARCH64-DARWIN: #define __INT_FAST64_MAX__ 9223372036854775807L -// AARCH64-DARWIN: #define __INT_FAST64_TYPE__ long int +// AARCH64-DARWIN: #define __INT_FAST64_FMTd__ "lld" +// AARCH64-DARWIN: #define __INT_FAST64_FMTi__ "lli" +// AARCH64-DARWIN: #define __INT_FAST64_MAX__ 9223372036854775807LL +// AARCH64-DARWIN: #define __INT_FAST64_TYPE__ long long int // AARCH64-DARWIN: #define __INT_FAST8_FMTd__ "hhd" // AARCH64-DARWIN: #define __INT_FAST8_FMTi__ "hhi" // AARCH64-DARWIN: #define __INT_FAST8_MAX__ 127 @@ -1347,10 +1347,10 @@ // AARCH64-DARWIN: #define __INT_LEAST32_FMTi__ "i" // AARCH64-DARWIN: #define __INT_LEAST32_MAX__ 2147483647 // AARCH64-DARWIN: #define __INT_LEAST32_TYPE__ int -// AARCH64-DARWIN: #define __INT_LEAST64_FMTd__ "ld" -// AARCH64-DARWIN: #define __INT_LEAST64_FMTi__ "li" -// AARCH64-DARWIN: #define __INT_LEAST64_MAX__ 9223372036854775807L -// AARCH64-DARWIN: #define __INT_LEAST64_TYPE__ long int +// AARCH64-DARWIN: #define __INT_LEAST64_FMTd__ "lld" +// AARCH64-DARWIN: #define __INT_LEAST64_FMTi__ "lli" +// AARCH64-DARWIN: #define __INT_LEAST64_MAX__ 9223372036854775807LL +// AARCH64-DARWIN: #define __INT_LEAST64_TYPE__ long long int // AARCH64-DARWIN: #define __INT_LEAST8_FMTd__ "hhd" // AARCH64-DARWIN: #define __INT_LEAST8_FMTi__ "hhi" // AARCH64-DARWIN: #define __INT_LEAST8_MAX__ 127 @@ -1418,16 +1418,16 @@ // AARCH64-DARWIN: #define __UINT_FAST16_TYPE__ unsigned short // AARCH64-DARWIN: #define __UINT_FAST32_MAX__ 4294967295U // AARCH64-DARWIN: #define __UINT_FAST32_TYPE__ unsigned int -// AARCH64-DARWIN: #define __UINT_FAST64_MAX__ 18446744073709551615UL -// AARCH64-DARWIN: #define __UINT_FAST64_TYPE__ long unsigned int +// AARCH64-DARWIN: #define __UINT_FAST64_MAX__ 18446744073709551615ULL +// AARCH64-DARWIN: #define __UINT_FAST64_TYPE__ long long unsigned int // AARCH64-DARWIN: #define __UINT_FAST8_MAX__ 255 // AARCH64-DARWIN: #define __UINT_FAST8_TYPE__ unsigned char // AARCH64-DARWIN: #define __UINT_LEAST16_MAX__ 65535 // AARCH64-DARWIN: #define __UINT_LEAST16_TYPE__ unsigned short // AARCH64-DARWIN: #define __UINT_LEAST32_MAX__ 4294967295U // AARCH64-DARWIN: #define __UINT_LEAST32_TYPE__ unsigned int -// AARCH64-DARWIN: #define __UINT_LEAST64_MAX__ 18446744073709551615UL -// AARCH64-DARWIN: #define __UINT_LEAST64_TYPE__ long unsigned int +// AARCH64-DARWIN: #define __UINT_LEAST64_MAX__ 18446744073709551615ULL +// AARCH64-DARWIN: #define __UINT_LEAST64_TYPE__ long long unsigned int // AARCH64-DARWIN: #define __UINT_LEAST8_MAX__ 255 // AARCH64-DARWIN: #define __UINT_LEAST8_TYPE__ unsigned char // AARCH64-DARWIN: #define __USER_LABEL_PREFIX__ _ @@ -2590,6 +2590,7 @@ // RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-none-eabihf < /dev/null | FileCheck -match-full-lines -check-prefix ARM-NONE-EABI %s // RUN: %clang_cc1 -E -dM -ffreestanding -triple=aarch64-none-eabi < /dev/null | FileCheck -match-full-lines -check-prefix ARM-NONE-EABI %s // RUN: %clang_cc1 -E -dM -ffreestanding -triple=aarch64-none-eabihf < /dev/null | FileCheck -match-full-lines -check-prefix ARM-NONE-EABI %s +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=aarch64-none-elf < /dev/null | FileCheck -match-full-lines -check-prefix ARM-NONE-EABI %s // ARM-NONE-EABI: #define __ELF__ 1 // No MachO targets use the full EABI, even if AAPCS is used. @@ -7978,6 +7979,7 @@ // X86_64:#define __WINT_WIDTH__ 32 // X86_64:#define __amd64 1 // X86_64:#define __amd64__ 1 +// X86_64:#define __code_model_small_ 1 // X86_64:#define __x86_64 1 // X86_64:#define __x86_64__ 1 // @@ -7987,7 +7989,10 @@ // X86_64H:#define __x86_64__ 1 // X86_64H:#define __x86_64h 1 // X86_64H:#define __x86_64h__ 1 - +// +// RUN: %clang -xc - -E -dM -mcmodel=medium --target=i386-unknown-linux < /dev/null | FileCheck -match-full-lines -check-prefix X86_MEDIUM %s +// X86_MEDIUM:#define __code_model_medium_ 1 +// // RUN: %clang_cc1 -E -dM -ffreestanding -triple=x86_64-none-none-gnux32 < /dev/null | FileCheck -match-full-lines -check-prefix X32 %s // RUN: %clang_cc1 -x c++ -E -dM -ffreestanding -triple=x86_64-none-none-gnux32 < /dev/null | FileCheck -match-full-lines -check-prefix X32 -check-prefix X32-CXX %s // @@ -9830,7 +9835,7 @@ // AVR:#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 // AVR:#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 1 // AVR:#define __GXX_ABI_VERSION 1002 -// AVR:#define __INT16_C_SUFFIX__ +// AVR:#define __INT16_C_SUFFIX__ // AVR:#define __INT16_MAX__ 32767 // AVR:#define __INT16_TYPE__ short // AVR:#define __INT32_C_SUFFIX__ L @@ -9839,7 +9844,7 @@ // AVR:#define __INT64_C_SUFFIX__ LL // AVR:#define __INT64_MAX__ 9223372036854775807LL // AVR:#define __INT64_TYPE__ long long int -// AVR:#define __INT8_C_SUFFIX__ +// AVR:#define __INT8_C_SUFFIX__ // AVR:#define __INT8_MAX__ 127 // AVR:#define __INT8_TYPE__ signed char // AVR:#define __INTMAX_C_SUFFIX__ LL @@ -9914,7 +9919,7 @@ // AVR:#define __UINT64_C_SUFFIX__ ULL // AVR:#define __UINT64_MAX__ 18446744073709551615ULL // AVR:#define __UINT64_TYPE__ long long unsigned int -// AVR:#define __UINT8_C_SUFFIX__ +// AVR:#define __UINT8_C_SUFFIX__ // AVR:#define __UINT8_MAX__ 255 // AVR:#define __UINT8_TYPE__ unsigned char // AVR:#define __UINTMAX_C_SUFFIX__ ULL @@ -9938,7 +9943,7 @@ // AVR:#define __UINT_LEAST64_TYPE__ long long unsigned int // AVR:#define __UINT_LEAST8_MAX__ 255 // AVR:#define __UINT_LEAST8_TYPE__ unsigned char -// AVR:#define __USER_LABEL_PREFIX__ +// AVR:#define __USER_LABEL_PREFIX__ // AVR:#define __WCHAR_MAX__ 32767 // AVR:#define __WCHAR_TYPE__ int // AVR:#define __WINT_TYPE__ int diff --git a/test/Preprocessor/pragma.c b/test/Preprocessor/pragma.c new file mode 100644 index 0000000000..b491632403 --- /dev/null +++ b/test/Preprocessor/pragma.c @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -E %s | FileCheck %s + +#pragma clang __debug parser_crash +#pragma clang __debug dump Test + +// CHECK: #pragma clang __debug parser_crash +// FIXME: The dump parameter is dropped. +// CHECK: #pragma clang __debug dump{{$}} diff --git a/test/Preprocessor/predefined-arch-macros.c b/test/Preprocessor/predefined-arch-macros.c index df61a6559a..65d3a3ec31 100644 --- a/test/Preprocessor/predefined-arch-macros.c +++ b/test/Preprocessor/predefined-arch-macros.c @@ -670,7 +670,6 @@ // CHECK_SKL_M32: #define __PRFCHW__ 1 // CHECK_SKL_M32: #define __RDRND__ 1 // CHECK_SKL_M32: #define __RDSEED__ 1 -// CHECK_SKL_M32: #define __RTM__ 1 // CHECK_SKL_M32: #define __SGX__ 1 // CHECK_SKL_M32: #define __SSE2__ 1 // CHECK_SKL_M32: #define __SSE3__ 1 @@ -706,7 +705,6 @@ // CHECK_SKL_M64: #define __PRFCHW__ 1 // CHECK_SKL_M64: #define __RDRND__ 1 // CHECK_SKL_M64: #define __RDSEED__ 1 -// CHECK_SKL_M64: #define __RTM__ 1 // CHECK_SKL_M64: #define __SGX__ 1 // CHECK_SKL_M64: #define __SSE2_MATH__ 1 // CHECK_SKL_M64: #define __SSE2__ 1 @@ -747,7 +745,6 @@ // CHECK_KNL_M32: #define __PREFETCHWT1__ 1 // CHECK_KNL_M32: #define __PRFCHW__ 1 // CHECK_KNL_M32: #define __RDRND__ 1 -// CHECK_KNL_M32: #define __RTM__ 1 // CHECK_KNL_M32: #define __SSE2__ 1 // CHECK_KNL_M32: #define __SSE3__ 1 // CHECK_KNL_M32: #define __SSE4_1__ 1 @@ -785,7 +782,6 @@ // CHECK_KNL_M64: #define __PREFETCHWT1__ 1 // CHECK_KNL_M64: #define __PRFCHW__ 1 // CHECK_KNL_M64: #define __RDRND__ 1 -// CHECK_KNL_M64: #define __RTM__ 1 // CHECK_KNL_M64: #define __SSE2_MATH__ 1 // CHECK_KNL_M64: #define __SSE2__ 1 // CHECK_KNL_M64: #define __SSE3__ 1 @@ -827,7 +823,6 @@ // CHECK_KNM_M32: #define __PREFETCHWT1__ 1 // CHECK_KNM_M32: #define __PRFCHW__ 1 // CHECK_KNM_M32: #define __RDRND__ 1 -// CHECK_KNM_M32: #define __RTM__ 1 // CHECK_KNM_M32: #define __SSE2__ 1 // CHECK_KNM_M32: #define __SSE3__ 1 // CHECK_KNM_M32: #define __SSE4_1__ 1 @@ -863,7 +858,6 @@ // CHECK_KNM_M64: #define __PREFETCHWT1__ 1 // CHECK_KNM_M64: #define __PRFCHW__ 1 // CHECK_KNM_M64: #define __RDRND__ 1 -// CHECK_KNM_M64: #define __RTM__ 1 // CHECK_KNM_M64: #define __SSE2_MATH__ 1 // CHECK_KNM_M64: #define __SSE2__ 1 // CHECK_KNM_M64: #define __SSE3__ 1 @@ -907,7 +901,6 @@ // CHECK_SKX_M32: #define __PRFCHW__ 1 // CHECK_SKX_M32: #define __RDRND__ 1 // CHECK_SKX_M32: #define __RDSEED__ 1 -// CHECK_SKX_M32: #define __RTM__ 1 // CHECK_SKX_M32-NOT: #define __SGX__ 1 // CHECK_SKX_M32: #define __SSE2__ 1 // CHECK_SKX_M32: #define __SSE3__ 1 @@ -954,7 +947,6 @@ // CHECK_SKX_M64: #define __PRFCHW__ 1 // CHECK_SKX_M64: #define __RDRND__ 1 // CHECK_SKX_M64: #define __RDSEED__ 1 -// CHECK_SKX_M64: #define __RTM__ 1 // CHECK_SKX_M64-NOT: #define __SGX__ 1 // CHECK_SKX_M64: #define __SSE2_MATH__ 1 // CHECK_SKX_M64: #define __SSE2__ 1 @@ -976,6 +968,103 @@ // CHECK_SKX_M64: #define __x86_64 1 // CHECK_SKX_M64: #define __x86_64__ 1 +// RUN: %clang -march=cascadelake -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CLX_M32 +// CHECK_CLX_M32: #define __AES__ 1 +// CHECK_CLX_M32: #define __AVX2__ 1 +// CHECK_CLX_M32: #define __AVX512BW__ 1 +// CHECK_CLX_M32: #define __AVX512CD__ 1 +// CHECK_CLX_M32: #define __AVX512DQ__ 1 +// CHECK_CLX_M32: #define __AVX512F__ 1 +// CHECK_CLX_M32: #define __AVX512VL__ 1 +// CHECK_CLX_M32: #define __AVX512VNNI__ 1 +// CHECK_CLX_M32: #define __AVX__ 1 +// CHECK_CLX_M32: #define __BMI2__ 1 +// CHECK_CLX_M32: #define __BMI__ 1 +// CHECK_CLX_M32: #define __CLFLUSHOPT__ 1 +// CHECK_CLX_M32: #define __CLWB__ 1 +// CHECK_CLX_M32: #define __F16C__ 1 +// CHECK_CLX_M32: #define __FMA__ 1 +// CHECK_CLX_M32: #define __INVPCID__ 1 +// CHECK_CLX_M32: #define __LZCNT__ 1 +// CHECK_CLX_M32: #define __MMX__ 1 +// CHECK_CLX_M32: #define __MOVBE__ 1 +// CHECK_CLX_M32: #define __MPX__ 1 +// CHECK_CLX_M32: #define __PCLMUL__ 1 +// CHECK_CLX_M32: #define __PKU__ 1 +// CHECK_CLX_M32: #define __POPCNT__ 1 +// CHECK_CLX_M32: #define __PRFCHW__ 1 +// CHECK_CLX_M32: #define __RDRND__ 1 +// CHECK_CLX_M32: #define __RDSEED__ 1 +// CHECK_CLX_M32-NOT: #define __SGX__ 1 +// CHECK_CLX_M32: #define __SSE2__ 1 +// CHECK_CLX_M32: #define __SSE3__ 1 +// CHECK_CLX_M32: #define __SSE4_1__ 1 +// CHECK_CLX_M32: #define __SSE4_2__ 1 +// CHECK_CLX_M32: #define __SSE__ 1 +// CHECK_CLX_M32: #define __SSSE3__ 1 +// CHECK_CLX_M32: #define __XSAVEC__ 1 +// CHECK_CLX_M32: #define __XSAVEOPT__ 1 +// CHECK_CLX_M32: #define __XSAVES__ 1 +// CHECK_CLX_M32: #define __XSAVE__ 1 +// CHECK_CLX_M32: #define __corei7 1 +// CHECK_CLX_M32: #define __corei7__ 1 +// CHECK_CLX_M32: #define __i386 1 +// CHECK_CLX_M32: #define __i386__ 1 +// CHECK_CLX_M32: #define __tune_corei7__ 1 +// CHECK_CLX_M32: #define i386 1 + +// RUN: %clang -march=cascadelake -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CLX_M64 +// CHECK_CLX_M64: #define __AES__ 1 +// CHECK_CLX_M64: #define __AVX2__ 1 +// CHECK_CLX_M64: #define __AVX512BW__ 1 +// CHECK_CLX_M64: #define __AVX512CD__ 1 +// CHECK_CLX_M64: #define __AVX512DQ__ 1 +// CHECK_CLX_M64: #define __AVX512F__ 1 +// CHECK_CLX_M64: #define __AVX512VL__ 1 +// CHECK_CLX_M64: #define __AVX512VNNI__ 1 +// CHECK_CLX_M64: #define __AVX__ 1 +// CHECK_CLX_M64: #define __BMI2__ 1 +// CHECK_CLX_M64: #define __BMI__ 1 +// CHECK_CLX_M64: #define __CLFLUSHOPT__ 1 +// CHECK_CLX_M64: #define __CLWB__ 1 +// CHECK_CLX_M64: #define __F16C__ 1 +// CHECK_CLX_M64: #define __FMA__ 1 +// CHECK_CLX_M64: #define __INVPCID__ 1 +// CHECK_CLX_M64: #define __LZCNT__ 1 +// CHECK_CLX_M64: #define __MMX__ 1 +// CHECK_CLX_M64: #define __MOVBE__ 1 +// CHECK_CLX_M64: #define __MPX__ 1 +// CHECK_CLX_M64: #define __PCLMUL__ 1 +// CHECK_CLX_M64: #define __PKU__ 1 +// CHECK_CLX_M64: #define __POPCNT__ 1 +// CHECK_CLX_M64: #define __PRFCHW__ 1 +// CHECK_CLX_M64: #define __RDRND__ 1 +// CHECK_CLX_M64: #define __RDSEED__ 1 +// CHECK_CLX_M64-NOT: #define __SGX__ 1 +// CHECK_CLX_M64: #define __SSE2_MATH__ 1 +// CHECK_CLX_M64: #define __SSE2__ 1 +// CHECK_CLX_M64: #define __SSE3__ 1 +// CHECK_CLX_M64: #define __SSE4_1__ 1 +// CHECK_CLX_M64: #define __SSE4_2__ 1 +// CHECK_CLX_M64: #define __SSE_MATH__ 1 +// CHECK_CLX_M64: #define __SSE__ 1 +// CHECK_CLX_M64: #define __SSSE3__ 1 +// CHECK_CLX_M64: #define __XSAVEC__ 1 +// CHECK_CLX_M64: #define __XSAVEOPT__ 1 +// CHECK_CLX_M64: #define __XSAVES__ 1 +// CHECK_CLX_M64: #define __XSAVE__ 1 +// CHECK_CLX_M64: #define __amd64 1 +// CHECK_CLX_M64: #define __amd64__ 1 +// CHECK_CLX_M64: #define __corei7 1 +// CHECK_CLX_M64: #define __corei7__ 1 +// CHECK_CLX_M64: #define __tune_corei7__ 1 +// CHECK_CLX_M64: #define __x86_64 1 +// CHECK_CLX_M64: #define __x86_64__ 1 + // RUN: %clang -march=cannonlake -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CNL_M32 @@ -1006,7 +1095,6 @@ // CHECK_CNL_M32: #define __PRFCHW__ 1 // CHECK_CNL_M32: #define __RDRND__ 1 // CHECK_CNL_M32: #define __RDSEED__ 1 -// CHECK_CNL_M32: #define __RTM__ 1 // CHECK_CNL_M32: #define __SGX__ 1 // CHECK_CNL_M32: #define __SHA__ 1 // CHECK_CNL_M32: #define __SSE2__ 1 @@ -1056,7 +1144,6 @@ // CHECK_CNL_M64: #define __PRFCHW__ 1 // CHECK_CNL_M64: #define __RDRND__ 1 // CHECK_CNL_M64: #define __RDSEED__ 1 -// CHECK_CNL_M64: #define __RTM__ 1 // CHECK_CNL_M64: #define __SGX__ 1 // CHECK_CNL_M64: #define __SHA__ 1 // CHECK_CNL_M64: #define __SSE2__ 1 @@ -1113,7 +1200,6 @@ // CHECK_ICL_M32: #define __RDPID__ 1 // CHECK_ICL_M32: #define __RDRND__ 1 // CHECK_ICL_M32: #define __RDSEED__ 1 -// CHECK_ICL_M32: #define __RTM__ 1 // CHECK_ICL_M32: #define __SGX__ 1 // CHECK_ICL_M32: #define __SHA__ 1 // CHECK_ICL_M32: #define __SSE2__ 1 @@ -1172,7 +1258,6 @@ // CHECK_ICL_M64: #define __RDPID__ 1 // CHECK_ICL_M64: #define __RDRND__ 1 // CHECK_ICL_M64: #define __RDSEED__ 1 -// CHECK_ICL_M64: #define __RTM__ 1 // CHECK_ICL_M64: #define __SGX__ 1 // CHECK_ICL_M64: #define __SHA__ 1 // CHECK_ICL_M64: #define __SSE2__ 1 @@ -1233,7 +1318,6 @@ // CHECK_ICX_M32: #define __RDPID__ 1 // CHECK_ICX_M32: #define __RDRND__ 1 // CHECK_ICX_M32: #define __RDSEED__ 1 -// CHECK_ICX_M32: #define __RTM__ 1 // CHECK_ICX_M32: #define __SGX__ 1 // CHECK_ICX_M32: #define __SHA__ 1 // CHECK_ICX_M32: #define __SSE2__ 1 @@ -1293,7 +1377,6 @@ // CHECK_ICX_M64: #define __RDPID__ 1 // CHECK_ICX_M64: #define __RDRND__ 1 // CHECK_ICX_M64: #define __RDSEED__ 1 -// CHECK_ICX_M64: #define __RTM__ 1 // CHECK_ICX_M64: #define __SGX__ 1 // CHECK_ICX_M64: #define __SHA__ 1 // CHECK_ICX_M64: #define __SSE2__ 1 |