summaryrefslogtreecommitdiff
path: root/src/wasm-features.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-features.h')
-rw-r--r--src/wasm-features.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wasm-features.h b/src/wasm-features.h
index 02e1660bb..df4397e78 100644
--- a/src/wasm-features.h
+++ b/src/wasm-features.h
@@ -42,7 +42,8 @@ struct FeatureSet {
// TODO: Remove this feature when the wasm spec stabilizes.
GCNNLocals = 1 << 13,
RelaxedSIMD = 1 << 14,
- All = (1 << 15) - 1
+ ExtendedConst = 1 << 15,
+ All = (1 << 16) - 1
};
static std::string toString(Feature f) {
@@ -77,6 +78,8 @@ struct FeatureSet {
return "gc-nn-locals";
case RelaxedSIMD:
return "relaxed-simd";
+ case ExtendedConst:
+ return "extended-const";
default:
WASM_UNREACHABLE("unexpected feature");
}
@@ -122,6 +125,7 @@ struct FeatureSet {
}
bool hasGCNNLocals() const { return (features & GCNNLocals) != 0; }
bool hasRelaxedSIMD() const { return (features & RelaxedSIMD) != 0; }
+ bool hasExtendedConst() const { return (features & ExtendedConst) != 0; }
bool hasAll() const { return (features & All) != 0; }
void set(FeatureSet f, bool v = true) {
@@ -144,6 +148,7 @@ struct FeatureSet {
}
void setGCNNLocals(bool v = true) { set(GCNNLocals, v); }
void setRelaxedSIMD(bool v = true) { set(RelaxedSIMD, v); }
+ void setExtendedConst(bool v = true) { set(ExtendedConst, v); }
void setMVP() { features = MVP; }
void setAll() {
// Do not set GCNNLocals, which forces the user to opt in to that feature