blob: 0421046c5bc88ed33daf4026b4969083a694e7d6 [file] [log] [blame]
Chad Rosier7a938fa2012-04-04 20:39:32 +00001// Test different values of -mfpmath.
2
3// RUN: %clang -target arm-apple-darwin10 -mfpmath=vfp %s -### -c -o %t.o 2>&1 \
4// RUN: | FileCheck --check-prefix=CHECK-VFP %s
5// CHECK-VFP: "-target-feature" "-neonfp"
6
7// RUN: %clang -target arm-apple-darwin10 -mfpmath=vfp2 %s -### -c -o %t.o 2>&1 \
8// RUN: | FileCheck --check-prefix=CHECK-VFP2 %s
9// CHECK-VFP2: "-target-feature" "-neonfp"
10
11// RUN: %clang -target arm-apple-darwin10 -mfpmath=vfp3 %s -### -c -o %t.o 2>&1 \
12// RUN: | FileCheck --check-prefix=CHECK-VFP3 %s
13// CHECK-VFP3: "-target-feature" "-neonfp"
14
15// RUN: %clang -target arm-apple-darwin10 -mfpmath=vfp4 %s -### -c -o %t.o 2>&1 \
16// RUN: | FileCheck --check-prefix=CHECK-VFP4 %s
17// CHECK-VFP4: "-target-feature" "-neonfp"
18
19// RUN: %clang -target arm-apple-darwin10 -mfpmath=neon %s -### -c -o %t.o 2>&1 \
20// RUN: | FileCheck --check-prefix=CHECK-NEON %s
21// CHECK-NEON: "-target-feature" "+neonfp"
22
23// RUN: %clang -target arm-apple-darwin10 -mfpmath=foo %s -### -c -o %t.o 2>&1 \
24// RUN: | FileCheck --check-prefix=CHECK-ERROR %s
25// CHECK-ERROR: clang compiler does not support '-mfpmath=foo'
Chad Rosier30fe6ba2012-04-04 22:13:40 +000026
27// RUN: %clang -target arm-apple-darwin10 -mcpu=arm1136j-s -mfpmath=neon %s -### -c -o %t.o 2>&1 \
28// RUN: | FileCheck --check-prefix=CHECK-MCPU-ERROR %s
29// CHECK-MCPU-ERROR: error: invalid feature '-mfpmath=neon' for CPU 'arm1136j-s'