Dan Gohman | c285307 | 2015-09-03 22:51:53 +0000 | [diff] [blame] | 1 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
| 2 | // RUN: -target wasm32-unknown-unknown -msimd128 \ |
| 3 | // RUN: | FileCheck %s -check-prefix=SIMD128 |
| 4 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
| 5 | // RUN: -target wasm64-unknown-unknown -msimd128 \ |
| 6 | // RUN: | FileCheck %s -check-prefix=SIMD128 |
| 7 | // |
| 8 | // SIMD128:#define __wasm_simd128__ 1{{$}} |
| 9 | // |
| 10 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
Thomas Lively | b7b9fdc | 2019-01-10 23:49:00 +0000 | [diff] [blame] | 11 | // RUN: -target wasm32-unknown-unknown -munimplemented-simd128 \ |
| 12 | // RUN: | FileCheck %s -check-prefix=SIMD128-UNIMPLEMENTED |
| 13 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
| 14 | // RUN: -target wasm64-unknown-unknown -munimplemented-simd128 \ |
| 15 | // RUN: | FileCheck %s -check-prefix=SIMD128-UNIMPLEMENTED |
| 16 | // |
| 17 | // SIMD128-UNIMPLEMENTED:#define __wasm_unimplemented_simd128__ 1{{$}} |
| 18 | // |
| 19 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
Thomas Lively | 88058d4 | 2019-01-31 21:02:19 +0000 | [diff] [blame] | 20 | // RUN: -target wasm32-unknown-unknown -mnontrapping-fptoint \ |
| 21 | // RUN: | FileCheck %s -check-prefix=NONTRAPPING-FPTOINT |
| 22 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
| 23 | // RUN: -target wasm64-unknown-unknown -mnontrapping-fptoint \ |
| 24 | // RUN: | FileCheck %s -check-prefix=NONTRAPPING-FPTOINT |
| 25 | // |
| 26 | // NONTRAPPING-FPTOINT:#define __wasm_nontrapping_fptoint__ 1{{$}} |
| 27 | // |
| 28 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
| 29 | // RUN: -target wasm32-unknown-unknown -msign-ext \ |
| 30 | // RUN: | FileCheck %s -check-prefix=SIGN-EXT |
| 31 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
| 32 | // RUN: -target wasm64-unknown-unknown -msign-ext \ |
| 33 | // RUN: | FileCheck %s -check-prefix=SIGN-EXT |
| 34 | // |
| 35 | // SIGN-EXT:#define __wasm_sign_ext__ 1{{$}} |
| 36 | // |
| 37 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
| 38 | // RUN: -target wasm32-unknown-unknown -mexception-handling \ |
| 39 | // RUN: | FileCheck %s -check-prefix=EXCEPTION-HANDLING |
| 40 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
| 41 | // RUN: -target wasm64-unknown-unknown -mexception-handling \ |
| 42 | // RUN: | FileCheck %s -check-prefix=EXCEPTION-HANDLING |
| 43 | // |
| 44 | // EXCEPTION-HANDLING:#define __wasm_exception_handling__ 1{{$}} |
| 45 | // |
| 46 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
| 47 | // RUN: -target wasm32-unknown-unknown -mbulk-memory \ |
| 48 | // RUN: | FileCheck %s -check-prefix=BULK-MEMORY |
| 49 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
| 50 | // RUN: -target wasm64-unknown-unknown -mbulk-memory \ |
| 51 | // RUN: | FileCheck %s -check-prefix=BULK-MEMORY |
| 52 | // |
| 53 | // BULK-MEMORY:#define __wasm_bulk_memory__ 1{{$}} |
| 54 | // |
| 55 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
Dan Gohman | c285307 | 2015-09-03 22:51:53 +0000 | [diff] [blame] | 56 | // RUN: -target wasm32-unknown-unknown -mcpu=mvp \ |
| 57 | // RUN: | FileCheck %s -check-prefix=MVP |
| 58 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
| 59 | // RUN: -target wasm64-unknown-unknown -mcpu=mvp \ |
| 60 | // RUN: | FileCheck %s -check-prefix=MVP |
| 61 | // |
| 62 | // MVP-NOT:#define __wasm_simd128__ |
Thomas Lively | 88058d4 | 2019-01-31 21:02:19 +0000 | [diff] [blame] | 63 | // MVP-NOT:#define __wasm_unimplemented_simd128__ |
| 64 | // MVP-NOT:#define __wasm_nontrapping_fptoint__ |
| 65 | // MVP-NOT:#define __wasm_sign_ext__ |
| 66 | // MVP-NOT:#define __wasm_exception_handling__ |
| 67 | // MVP-NOT:#define __wasm_bulk_memory__ |
Dan Gohman | c285307 | 2015-09-03 22:51:53 +0000 | [diff] [blame] | 68 | // |
| 69 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
| 70 | // RUN: -target wasm32-unknown-unknown -mcpu=bleeding-edge \ |
Thomas Lively | 88058d4 | 2019-01-31 21:02:19 +0000 | [diff] [blame] | 71 | // RUN: | FileCheck %s -check-prefix=BLEEDING-EDGE |
Dan Gohman | c285307 | 2015-09-03 22:51:53 +0000 | [diff] [blame] | 72 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
| 73 | // RUN: -target wasm64-unknown-unknown -mcpu=bleeding-edge \ |
Thomas Lively | 88058d4 | 2019-01-31 21:02:19 +0000 | [diff] [blame] | 74 | // RUN: | FileCheck %s -check-prefix=BLEEDING-EDGE |
Dan Gohman | c285307 | 2015-09-03 22:51:53 +0000 | [diff] [blame] | 75 | // |
Thomas Lively | 88058d4 | 2019-01-31 21:02:19 +0000 | [diff] [blame] | 76 | // BLEEDING-EDGE:#define __wasm_nontrapping_fptoint__ 1{{$}} |
| 77 | // BLEEDING-EDGE:#define __wasm_sign_ext__ 1{{$}} |
| 78 | // BLEEDING-EDGE:#define __wasm_simd128__ 1{{$}} |
| 79 | // BLEEDING-EDGE-NOT:#define __wasm_unimplemented_simd128__ 1{{$}} |
Dan Gohman | c285307 | 2015-09-03 22:51:53 +0000 | [diff] [blame] | 80 | // |
| 81 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
| 82 | // RUN: -target wasm32-unknown-unknown -mcpu=bleeding-edge -mno-simd128 \ |
Thomas Lively | 88058d4 | 2019-01-31 21:02:19 +0000 | [diff] [blame] | 83 | // RUN: | FileCheck %s -check-prefix=BLEEDING-EDGE-NO-SIMD128 |
Dan Gohman | c285307 | 2015-09-03 22:51:53 +0000 | [diff] [blame] | 84 | // RUN: %clang -E -dM %s -o - 2>&1 \ |
| 85 | // RUN: -target wasm64-unknown-unknown -mcpu=bleeding-edge -mno-simd128 \ |
Thomas Lively | 88058d4 | 2019-01-31 21:02:19 +0000 | [diff] [blame] | 86 | // RUN: | FileCheck %s -check-prefix=BLEEDING-EDGE-NO-SIMD128 |
Dan Gohman | c285307 | 2015-09-03 22:51:53 +0000 | [diff] [blame] | 87 | // |
Thomas Lively | 88058d4 | 2019-01-31 21:02:19 +0000 | [diff] [blame] | 88 | // BLEEDING-EDGE-NO-SIMD128-NOT:#define __wasm_simd128__ |