diff options
author | Zancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au> | 2012-09-24 09:58:17 +1000 |
---|---|---|
committer | Zancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au> | 2012-09-24 09:58:17 +1000 |
commit | 222e2a7620e6520ffaf4fc4e69d79c18da31542e (patch) | |
tree | 7bfbc05bfa3b41c8f9d2e56d53a0bc3e310df239 /clang/test/Driver/arm-mfpmath.c | |
parent | 3d206f03985b50beacae843d880bccdc91a9f424 (diff) |
Add the clang library to the repo (with some of my changes, too).
Diffstat (limited to 'clang/test/Driver/arm-mfpmath.c')
-rw-r--r-- | clang/test/Driver/arm-mfpmath.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/clang/test/Driver/arm-mfpmath.c b/clang/test/Driver/arm-mfpmath.c new file mode 100644 index 0000000..0421046 --- /dev/null +++ b/clang/test/Driver/arm-mfpmath.c @@ -0,0 +1,29 @@ +// Test different values of -mfpmath. + +// RUN: %clang -target arm-apple-darwin10 -mfpmath=vfp %s -### -c -o %t.o 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-VFP %s +// CHECK-VFP: "-target-feature" "-neonfp" + +// RUN: %clang -target arm-apple-darwin10 -mfpmath=vfp2 %s -### -c -o %t.o 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-VFP2 %s +// CHECK-VFP2: "-target-feature" "-neonfp" + +// RUN: %clang -target arm-apple-darwin10 -mfpmath=vfp3 %s -### -c -o %t.o 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-VFP3 %s +// CHECK-VFP3: "-target-feature" "-neonfp" + +// RUN: %clang -target arm-apple-darwin10 -mfpmath=vfp4 %s -### -c -o %t.o 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-VFP4 %s +// CHECK-VFP4: "-target-feature" "-neonfp" + +// RUN: %clang -target arm-apple-darwin10 -mfpmath=neon %s -### -c -o %t.o 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-NEON %s +// CHECK-NEON: "-target-feature" "+neonfp" + +// RUN: %clang -target arm-apple-darwin10 -mfpmath=foo %s -### -c -o %t.o 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-ERROR %s +// CHECK-ERROR: clang compiler does not support '-mfpmath=foo' + +// RUN: %clang -target arm-apple-darwin10 -mcpu=arm1136j-s -mfpmath=neon %s -### -c -o %t.o 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-MCPU-ERROR %s +// CHECK-MCPU-ERROR: error: invalid feature '-mfpmath=neon' for CPU 'arm1136j-s' |