mfpmath.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // RUN: %clang_cc1 -triple i686-pc-linux -target-feature -sse %s
  2. // RUN: %clang_cc1 -triple i686-pc-linux -target-feature -sse -mfpmath 387 %s
  3. // RUN: %clang_cc1 -triple i686-pc-linux -target-feature +sse %s
  4. // RUN: %clang_cc1 -triple i686-pc-linux -target-feature +sse -mfpmath sse %s
  5. // RUN: not %clang_cc1 -triple i686-pc-linux -target-feature +sse \
  6. // RUN: -mfpmath xyz %s 2>&1 | FileCheck --check-prefix=CHECK-XYZ %s
  7. // CHECK-XYZ: error: unknown FP unit 'xyz'
  8. // RUN: not %clang_cc1 -triple i686-pc-linux -target-feature +sse \
  9. // RUN: -mfpmath 387 %s 2>&1 | FileCheck --check-prefix=CHECK-NO-387 %s
  10. // CHECK-NO-387: error: the '387' unit is not supported with this instruction set
  11. // RUN: not %clang_cc1 -triple i686-pc-linux -target-feature -sse \
  12. // RUN: -mfpmath sse %s 2>&1 | FileCheck --check-prefix=CHECK-NO-SSE %s
  13. // CHECK-NO-SSE: error: the 'sse' unit is not supported with this instruction set
  14. // RUN: %clang_cc1 -triple arm-apple-darwin10 -mfpmath vfp %s
  15. // RUN: %clang_cc1 -triple arm-apple-darwin10 -mfpmath vfp2 %s
  16. // RUN: %clang_cc1 -triple arm-apple-darwin10 -mfpmath vfp3 %s
  17. // RUN: %clang_cc1 -triple arm-apple-darwin10 -mfpmath vfp4 %s
  18. // RUN: %clang_cc1 -triple arm-apple-darwin10 -target-cpu cortex-a9 \
  19. // RUN: -mfpmath neon %s
  20. // RUN: not %clang_cc1 -triple arm-apple-darwin10 -mfpmath foo %s 2>&1 \
  21. // RUN: FileCheck --check-prefix=CHECK-FOO %s
  22. // CHECK-FOO: unknown FP unit 'foo'
  23. // RUN: not %clang_cc1 -triple arm-apple-darwin10 -target-cpu arm1136j-s \
  24. // RUN: -mfpmath neon %s 2>&1 | FileCheck --check-prefix=CHECK-NO-NEON %s
  25. // RUN: not %clang_cc1 -triple arm-apple-darwin10 -target-cpu cortex-a9 \
  26. // RUN: -target-feature -neon -mfpmath neon %s 2>&1 | FileCheck --check-prefix=CHECK-NO-NEON %s
  27. // CHECK-NO-NEON: error: the 'neon' unit is not supported with this instruction set