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