diff options
author | Dan Gohman <dev@sunfishcode.online> | 2022-10-18 10:50:37 -0700 |
---|---|---|
committer | Dan Gohman <dev@sunfishcode.online> | 2022-10-25 11:44:22 -0700 |
commit | 1e4e2433bcd1a0296ef1043c462252f0d087d90c (patch) | |
tree | da511571b8242d794e6e4a4c179280f0070aa218 /clang/lib/Basic/Targets/WebAssembly.cpp | |
parent | 11afbf396e10e1b1e91a5991e2aec1916e29a910 (diff) | |
download | llvm-1e4e2433bcd1a0296ef1043c462252f0d087d90c.zip llvm-1e4e2433bcd1a0296ef1043c462252f0d087d90c.tar.gz llvm-1e4e2433bcd1a0296ef1043c462252f0d087d90c.tar.bz2 |
[WebAssembly] Update supported features in the generic CPU configuration
Enable sign-ext and mutable-globals in -mcpu=generic. This makes these features
enabled by default.
These features are all [finished proposals], and all major wasm engines
support them.
[finished proposals]: https://github.com/WebAssembly/proposals/blob/main/finished-proposals.md
Differential Revision: https://reviews.llvm.org/D125728
Diffstat (limited to 'clang/lib/Basic/Targets/WebAssembly.cpp')
-rw-r--r-- | clang/lib/Basic/Targets/WebAssembly.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets/WebAssembly.cpp b/clang/lib/Basic/Targets/WebAssembly.cpp index e0e7f6a..a170a7e 100644 --- a/clang/lib/Basic/Targets/WebAssembly.cpp +++ b/clang/lib/Basic/Targets/WebAssembly.cpp @@ -147,6 +147,9 @@ bool WebAssemblyTargetInfo::initFeatureMap( Features["mutable-globals"] = true; Features["tail-call"] = true; setSIMDLevel(Features, SIMD128, true); + } else if (CPU == "generic") { + Features["sign-ext"] = true; + Features["mutable-globals"] = true; } return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec); |