summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-binary.cpp
diff options
context:
space:
mode:
authorNg Zhi An <zhin@chromium.org>2021-09-23 12:38:06 -0700
committerGitHub <noreply@github.com>2021-09-23 12:38:06 -0700
commit31252873463fd142a1eabb71b965da04a23a00e2 (patch)
tree0fe663c3e5ec0d95a0148e888837b50790e6ac29 /src/wasm/wasm-binary.cpp
parent675295888609a688ee81dc9ad2024169da5aa7ed (diff)
downloadbinaryen-31252873463fd142a1eabb71b965da04a23a00e2.tar.gz
binaryen-31252873463fd142a1eabb71b965da04a23a00e2.tar.bz2
binaryen-31252873463fd142a1eabb71b965da04a23a00e2.zip
Add feature flag for relaxed-simd (#4183)
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r--src/wasm/wasm-binary.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index 74895c868..cd1cfaa0f 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -1048,6 +1048,8 @@ void WasmBinaryWriter::writeFeaturesSection() {
return BinaryConsts::UserSections::Memory64Feature;
case FeatureSet::TypedFunctionReferences:
return BinaryConsts::UserSections::TypedFunctionReferencesFeature;
+ case FeatureSet::RelaxedSIMD:
+ return BinaryConsts::UserSections::RelaxedSIMDFeature;
default:
WASM_UNREACHABLE("unexpected feature flag");
}
@@ -3263,6 +3265,8 @@ void WasmBinaryBuilder::readFeatures(size_t payloadLen) {
} else if (name ==
BinaryConsts::UserSections::TypedFunctionReferencesFeature) {
feature = FeatureSet::TypedFunctionReferences;
+ } else if (name == BinaryConsts::UserSections::RelaxedSIMDFeature) {
+ feature = FeatureSet::RelaxedSIMD;
} else {
// Silently ignore unknown features (this may be and old binaryen running
// on a new wasm).