1 // RUN: %clang_cc1 -E -dM -triple=x86_64-none-none %s -o - \
2 // RUN: | FileCheck %s -strict-whitespace
4 // RUN: %clang_cc1 -E -dM -triple=x86_64-none-none -target-feature -sse \
5 // RUN: %s -o - | FileCheck %s -check-prefix=EXT -strict-whitespace
7 // RUN: %clang_cc1 -E -dM -triple=arm64e-apple-ios -target-feature -sse \
8 // RUN: %s -o - | FileCheck %s -strict-whitespace
10 // RUN: %clang_cc1 -E -dM -triple=arm64e-apple-ios -target-feature +sse \
11 // RUN: %s -o - | FileCheck %s -strict-whitespace
13 // RUN: %clang_cc1 -E -dM -triple=arm64_32-apple-ios %s -o - \
14 // RUN: | FileCheck %s -strict-whitespace
16 // RUN: %clang_cc1 -E -dM -triple=arm64_32-apple-ios -target-feature -sse \
17 // RUN: %s -o - | FileCheck %s -strict-whitespace
19 // RUN: %clang_cc1 -E -dM -triple=x86_64-apple-macos13.0 -ffast-math \
20 // RUN: %s -o - | FileCheck %s -check-prefix=CHECK-MINUS-ONE -strict-whitespace
22 // RUN: %clang_cc1 -E -dM -triple i386-pc-windows -target-cpu pentium4 %s -o - \
23 // RUN: | FileCheck %s -strict-whitespace
25 // RUN: %clang_cc1 -E -dM -triple i386-pc-windows -target-cpu pentium4 \
26 // RUN: -target-feature -sse %s -o - | FileCheck -check-prefix=EXT %s \
27 // RUN: -strict-whitespace
29 #ifdef __FLT_EVAL_METHOD__
30 #if __FLT_EVAL_METHOD__ == 3
31 #define __GLIBC_FLT_EVAL_METHOD 2
33 #define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__
35 #elif defined __x86_64__
36 #define __GLIBC_FLT_EVAL_METHOD 0
38 #define __GLIBC_FLT_EVAL_METHOD 2
41 #if __GLIBC_FLT_EVAL_METHOD == -1
42 #define Name "MinusOne"
43 #elif __GLIBC_FLT_EVAL_METHOD == 0 || __GLIBC_FLT_EVAL_METHOD == 16
45 #elif __GLIBC_FLT_EVAL_METHOD == 1
47 #elif __GLIBC_FLT_EVAL_METHOD == 2
49 #elif __GLIBC_FLT_EVAL_METHOD == 32
51 #elif __GLIBC_FLT_EVAL_METHOD == 33
53 #elif __GLIBC_FLT_EVAL_METHOD == 64
55 #elif __GLIBC_FLT_EVAL_METHOD == 65
57 #elif __GLIBC_FLT_EVAL_METHOD == 128
59 #elif __GLIBC_FLT_EVAL_METHOD == 129
62 #error "Unknown __GLIBC_FLT_EVAL_METHOD"
66 // CHECK: #define Name "One"
67 // CHECK-MINUS-ONE: #define Name "MinusOne"
68 // EXT: #define Name "Three"
72 #pragma fp eval_method(double)
74 #if __FLT_EVAL_METHOD__ == 3
76 #elif __FLT_EVAL_METHOD__ == 0
78 #elif __FLT_EVAL_METHOD__ == 1
80 #elif __FLT_EVAL_METHOD__ == 2
85 // CHECK: #define Val "val0"
86 // EXT: #define Val "val2"