xref: /aosp_15_r20/external/clang/test/Frontend/mfpmath.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -triple i686-pc-linux -target-feature -sse  %s
2*67e74705SXin Li 
3*67e74705SXin Li // RUN: %clang_cc1 -triple i686-pc-linux -target-feature -sse -mfpmath 387 %s
4*67e74705SXin Li 
5*67e74705SXin Li // RUN: %clang_cc1 -triple i686-pc-linux -target-feature +sse %s
6*67e74705SXin Li 
7*67e74705SXin Li // RUN: %clang_cc1 -triple i686-pc-linux -target-feature +sse -mfpmath sse %s
8*67e74705SXin Li 
9*67e74705SXin Li // RUN: not %clang_cc1 -triple i686-pc-linux -target-feature +sse \
10*67e74705SXin Li // RUN: -mfpmath xyz %s 2>&1 | FileCheck --check-prefix=CHECK-XYZ %s
11*67e74705SXin Li // CHECK-XYZ: error: unknown FP unit 'xyz'
12*67e74705SXin Li 
13*67e74705SXin Li // RUN: not %clang_cc1 -triple i686-pc-linux -target-feature +sse \
14*67e74705SXin Li // RUN: -mfpmath 387 %s 2>&1 | FileCheck --check-prefix=CHECK-NO-387 %s
15*67e74705SXin Li // CHECK-NO-387: error: the '387' unit is not supported with this instruction set
16*67e74705SXin Li 
17*67e74705SXin Li // RUN: not %clang_cc1 -triple i686-pc-linux -target-feature -sse \
18*67e74705SXin Li // RUN: -mfpmath sse %s 2>&1 | FileCheck --check-prefix=CHECK-NO-SSE %s
19*67e74705SXin Li // CHECK-NO-SSE: error: the 'sse' unit is not supported with this instruction set
20*67e74705SXin Li 
21*67e74705SXin Li 
22*67e74705SXin Li // RUN: %clang_cc1 -triple arm-apple-darwin10 -mfpmath vfp %s
23*67e74705SXin Li 
24*67e74705SXin Li // RUN: %clang_cc1 -triple arm-apple-darwin10 -mfpmath vfp2 %s
25*67e74705SXin Li 
26*67e74705SXin Li // RUN: %clang_cc1 -triple arm-apple-darwin10 -mfpmath vfp3 %s
27*67e74705SXin Li 
28*67e74705SXin Li // RUN: %clang_cc1 -triple arm-apple-darwin10 -mfpmath vfp4 %s
29*67e74705SXin Li 
30*67e74705SXin Li // RUN: %clang_cc1 -triple arm-apple-darwin10 -target-cpu cortex-a9 \
31*67e74705SXin Li // RUN: -mfpmath neon %s
32*67e74705SXin Li 
33*67e74705SXin Li // RUN: not %clang_cc1 -triple arm-apple-darwin10 -mfpmath foo %s 2>&1 \
34*67e74705SXin Li // RUN: FileCheck --check-prefix=CHECK-FOO %s
35*67e74705SXin Li // CHECK-FOO: unknown FP unit 'foo'
36*67e74705SXin Li 
37*67e74705SXin Li // RUN: not %clang_cc1 -triple arm-apple-darwin10 -target-cpu arm1136j-s \
38*67e74705SXin Li // RUN: -mfpmath neon %s 2>&1 | FileCheck --check-prefix=CHECK-NO-NEON %s
39*67e74705SXin Li 
40*67e74705SXin Li // RUN: not %clang_cc1 -triple arm-apple-darwin10 -target-cpu cortex-a9 \
41*67e74705SXin Li // RUN: -target-feature -neon -mfpmath neon %s 2>&1 | FileCheck --check-prefix=CHECK-NO-NEON %s
42*67e74705SXin Li 
43*67e74705SXin Li // CHECK-NO-NEON: error: the 'neon' unit is not supported with this instruction set
44