@@ -58,11 +58,12 @@ struct FeatureSet {
5858 RelaxedAtomics = 1 << 22 ,
5959 CustomPageSizes = 1 << 23 ,
6060 Multibyte = 1 << 24 ,
61+ WideArithmetic = 1 << 25 ,
6162 MVP = None,
6263 // Keep in sync with llvm default features:
6364 // https://github.com/llvm/llvm-project/blob/c7576cb89d6c95f03968076e902d3adfd1996577/clang/lib/Basic/Targets/WebAssembly.cpp#L150-L153
6465 Default = SignExt | MutableGlobals,
65- All = (1 << 25 ) - 1 ,
66+ All = (1 << 26 ) - 1 ,
6667 };
6768
6869 static std::string toString (Feature f) {
@@ -117,6 +118,8 @@ struct FeatureSet {
117118 return " custom-page-sizes" ;
118119 case Multibyte:
119120 return " multibyte" ;
121+ case WideArithmetic:
122+ return " wide-arithmetic" ;
120123 case MVP:
121124 case Default:
122125 case All:
@@ -180,6 +183,7 @@ struct FeatureSet {
180183 bool hasRelaxedAtomics () const { return (features & RelaxedAtomics) != 0 ; }
181184 bool hasCustomPageSizes () const { return (features & CustomPageSizes) != 0 ; }
182185 bool hasMultibyte () const { return (features & Multibyte) != 0 ; }
186+ bool hasWideArithmetic () const { return (features & WideArithmetic) != 0 ; }
183187 bool hasAll () const { return (features & All) != 0 ; }
184188
185189 void set (FeatureSet f, bool v = true ) {
@@ -208,6 +212,7 @@ struct FeatureSet {
208212 void setCustomDescriptors (bool v = true ) { set (CustomDescriptors, v); }
209213 void setRelaxedAtomics (bool v = true ) { set (RelaxedAtomics, v); }
210214 void setMultibyte (bool v = true ) { set (Multibyte, v); }
215+ void setWideArithmetic (bool v = true ) { set (WideArithmetic, v); }
211216 void setMVP () { features = MVP; }
212217 void setAll () { features = All; }
213218
0 commit comments