| 1 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -fsyntax-only 2>&1 | FileCheck %s |
| 2 |
|
| 3 |
// CHECK: "-fvisibility=hidden" |
| 4 |
|
| 5 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mcpu=mvp 2>&1 | FileCheck %s -check-prefix=MVP |
| 6 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s 2>&1 | FileCheck %s -check-prefix=GENERIC |
| 7 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mcpu=generic 2>&1 | FileCheck %s -check-prefix=GENERIC |
| 8 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mcpu=bleeding-edge 2>&1 | FileCheck %s -check-prefix=BLEEDING-EDGE |
| 9 |
|
| 10 |
// MVP: "-target-cpu" "mvp" |
| 11 |
// GENERIC: "-target-cpu" "generic" |
| 12 |
// BLEEDING-EDGE: "-target-cpu" "bleeding-edge" |
| 13 |
|
| 14 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -matomics 2>&1 | FileCheck %s -check-prefix=ATOMICS |
| 15 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-atomics 2>&1 | FileCheck %s -check-prefix=NO-ATOMICS |
| 16 |
|
| 17 |
// ATOMICS: "-target-feature" "+atomics" |
| 18 |
// NO-ATOMICS: "-target-feature" "-atomics" |
| 19 |
|
| 20 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mbulk-memory 2>&1 | FileCheck %s -check-prefix=BULK-MEMORY |
| 21 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-bulk-memory 2>&1 | FileCheck %s -check-prefix=NO-BULK-MEMORY |
| 22 |
|
| 23 |
// BULK-MEMORY: "-target-feature" "+bulk-memory" |
| 24 |
// NO-BULK-MEMORY: "-target-feature" "-bulk-memory" |
| 25 |
|
| 26 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mexception-handling 2>&1 | FileCheck %s -check-prefix=EXCEPTION-HANDLING |
| 27 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-exception-handling 2>&1 | FileCheck %s -check-prefix=NO-EXCEPTION-HANDLING |
| 28 |
|
| 29 |
// EXCEPTION-HANDLING: "-target-feature" "+exception-handling" |
| 30 |
// NO-EXCEPTION-HANDLING: "-target-feature" "-exception-handling" |
| 31 |
|
| 32 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mextended-const 2>&1 | FileCheck %s -check-prefix=EXTENDED-CONST |
| 33 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-extended-const 2>&1 | FileCheck %s -check-prefix=NO-EXTENDED-CONST |
| 34 |
|
| 35 |
// EXTENDED-CONST: "-target-feature" "+extended-const" |
| 36 |
// NO-EXTENDED-CONST: "-target-feature" "-extended-const" |
| 37 |
|
| 38 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mfp16 2>&1 | FileCheck %s -check-prefix=HALF-PRECISION |
| 39 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-fp16 2>&1 | FileCheck %s -check-prefix=NO-HALF-PRECISION |
| 40 |
|
| 41 |
// HALF-PRECISION: "-target-feature" "+fp16" |
| 42 |
// NO-HALF-PRECISION: "-target-feature" "-fp16" |
| 43 |
|
| 44 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mgc 2>&1 | FileCheck %s -check-prefix=GC |
| 45 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-gc 2>&1 | FileCheck %s -check-prefix=NO-GC |
| 46 |
|
| 47 |
// GC: "-target-feature" "+gc" |
| 48 |
// NO-GC: "-target-feature" "-gc" |
| 49 |
|
| 50 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mmultimemory 2>&1 | FileCheck %s -check-prefix=MULTIMEMORY |
| 51 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-multimemory 2>&1 | FileCheck %s -check-prefix=NO-MULTIMEMORY |
| 52 |
|
| 53 |
// MULTIMEMORY: "-target-feature" "+multimemory" |
| 54 |
// NO-MULTIMEMORY: "-target-feature" "-multimemory" |
| 55 |
|
| 56 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mmultivalue 2>&1 | FileCheck %s -check-prefix=MULTIVALUE |
| 57 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-multivalue 2>&1 | FileCheck %s -check-prefix=NO-MULTIVALUE |
| 58 |
|
| 59 |
// MULTIVALUE: "-target-feature" "+multivalue" |
| 60 |
// NO-MULTIVALUE: "-target-feature" "-multivalue" |
| 61 |
|
| 62 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mmutable-globals 2>&1 | FileCheck %s -check-prefix=MUTABLE-GLOBALS |
| 63 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-mutable-globals 2>&1 | FileCheck %s -check-prefix=NO-MUTABLE-GLOBALS |
| 64 |
|
| 65 |
// MUTABLE-GLOBALS: "-target-feature" "+mutable-globals" |
| 66 |
// NO-MUTABLE-GLOBALS: "-target-feature" "-mutable-globals" |
| 67 |
|
| 68 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mnontrapping-fptoint 2>&1 | FileCheck %s -check-prefix=NONTRAPPING-FPTOINT |
| 69 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-nontrapping-fptoint 2>&1 | FileCheck %s -check-prefix=NO-NONTRAPPING-FPTOINT |
| 70 |
|
| 71 |
// NONTRAPPING-FPTOINT: "-target-feature" "+nontrapping-fptoint" |
| 72 |
// NO-NONTRAPPING-FPTOINT: "-target-feature" "-nontrapping-fptoint" |
| 73 |
|
| 74 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mreference-types 2>&1 | FileCheck %s -check-prefix=REFERENCE-TYPES |
| 75 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-reference-types 2>&1 | FileCheck %s -check-prefix=NO-REFERENCE-TYPES |
| 76 |
|
| 77 |
// REFERENCE-TYPES: "-target-feature" "+reference-types" |
| 78 |
// NO-REFERENCE-TYPES: "-target-feature" "-reference-types" |
| 79 |
|
| 80 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mrelaxed-simd 2>&1 | FileCheck %s -check-prefix=RELAXED-SIMD |
| 81 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-relaxed-simd 2>&1 | FileCheck %s -check-prefix=NO-RELAXED-SIMD |
| 82 |
|
| 83 |
// RELAXED-SIMD: "-target-feature" "+relaxed-simd" |
| 84 |
// NO-RELAXED-SIMD: "-target-feature" "-relaxed-simd" |
| 85 |
|
| 86 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -msign-ext 2>&1 | FileCheck %s -check-prefix=SIGN-EXT |
| 87 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-sign-ext 2>&1 | FileCheck %s -check-prefix=NO-SIGN-EXT |
| 88 |
|
| 89 |
// SIGN-EXT: "-target-feature" "+sign-ext" |
| 90 |
// NO-SIGN-EXT: "-target-feature" "-sign-ext" |
| 91 |
|
| 92 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -msimd128 2>&1 | FileCheck %s -check-prefix=SIMD128 |
| 93 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-simd128 2>&1 | FileCheck %s -check-prefix=NO-SIMD128 |
| 94 |
|
| 95 |
// SIMD128: "-target-feature" "+simd128" |
| 96 |
// NO-SIMD128: "-target-feature" "-simd128" |
| 97 |
|
| 98 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mtail-call 2>&1 | FileCheck %s -check-prefix=TAIL-CALL |
| 99 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-tail-call 2>&1 | FileCheck %s -check-prefix=NO-TAIL-CALL |
| 100 |
|
| 101 |
// TAIL-CALL: "-target-feature" "+tail-call" |
| 102 |
// NO-TAIL-CALL: "-target-feature" "-tail-call" |
| 103 |
|
| 104 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mwide-arithmetic 2>&1 | FileCheck %s -check-prefix=WIDE-ARITH |
| 105 |
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-wide-arithmetic 2>&1 | FileCheck %s -check-prefix=NO-WIDE-ARITH |
| 106 |
|
| 107 |
// WIDE-ARITH: "-target-feature" "+wide-arithmetic" |
| 108 |
// NO-WIDE-ARITH: "-target-feature" "-wide-arithmetic" |