summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/wasm-target-features.c
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2019-03-29 22:00:18 +0000
committerThomas Lively <tlively@google.com>2019-03-29 22:00:18 +0000
commit5f0c4c67bbff5374b196578486a16147cb786548 (patch)
treee66d05e4810f760c273b7a4a3d477ceefd008103 /clang/test/Preprocessor/wasm-target-features.c
parent32fd32bc6f6de46b96c9e09575694d34f248d6ee (diff)
downloadbcm5719-llvm-5f0c4c67bbff5374b196578486a16147cb786548.tar.gz
bcm5719-llvm-5f0c4c67bbff5374b196578486a16147cb786548.zip
[WebAssembly] Add mutable globals feature
Summary: This feature is not actually used for anything in the WebAssembly backend, but adding it allows users to get it into the target features sections of their objects, which makes these objects future-compatible. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, jdoerfert, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D60013 llvm-svn: 357321
Diffstat (limited to 'clang/test/Preprocessor/wasm-target-features.c')
-rw-r--r--clang/test/Preprocessor/wasm-target-features.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/wasm-target-features.c b/clang/test/Preprocessor/wasm-target-features.c
index d32c1b00be4..2bf94398a1d 100644
--- a/clang/test/Preprocessor/wasm-target-features.c
+++ b/clang/test/Preprocessor/wasm-target-features.c
@@ -71,6 +71,15 @@
// PTHREAD:#define __wasm_atomics__ 1{{$}}
// RUN: %clang -E -dM %s -o - 2>&1 \
+// RUN: -target wasm32-unknown-unknown -mmutable-globals \
+// RUN: | FileCheck %s -check-prefix=MUTABLE-GLOBALS
+// RUN: %clang -E -dM %s -o - 2>&1 \
+// RUN: -target wasm64-unknown-unknown -mmutable-globals \
+// RUN: | FileCheck %s -check-prefix=MUTABLE-GLOBALS
+//
+// MUTABLE-GLOBALS:#define __wasm_mutable_globals__ 1{{$}}
+
+// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm32-unknown-unknown -mcpu=mvp \
// RUN: | FileCheck %s -check-prefix=MVP
// RUN: %clang -E -dM %s -o - 2>&1 \
@@ -84,6 +93,7 @@
// MVP-NOT:#define __wasm_exception_handling__
// MVP-NOT:#define __wasm_bulk_memory__
// MVP-NOT:#define __wasm_atomics__
+// MVP-NOT:#define __wasm_mutable_globals__
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm32-unknown-unknown -mcpu=bleeding-edge \
@@ -96,6 +106,7 @@
// BLEEDING-EDGE-DAG:#define __wasm_sign_ext__ 1{{$}}
// BLEEDING-EDGE-DAG:#define __wasm_simd128__ 1{{$}}
// BLEEDING-EDGE-DAG:#define __wasm_atomics__ 1{{$}}
+// BLEEDING-EDGE-DAG:#define __wasm_mutable_globals__ 1{{$}}
// BLEEDING-EDGE-NOT:#define __wasm_unimplemented_simd128__ 1{{$}}
// RUN: %clang -E -dM %s -o - 2>&1 \
OpenPOWER on IntegriCloud