Chad Rosier | 7a938fa | 2012-04-04 20:39:32 +0000 | [diff] [blame] | 1 | // 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 Rosier | 30fe6ba | 2012-04-04 22:13:40 +0000 | [diff] [blame] | 26 | |
| 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' |