sunfish created this revision. Herald added subscribers: pmatos, asb, ecnelises, jgravelle-google, sbc100, dschuff. Herald added a project: All. sunfish requested review of this revision. Herald added a subscriber: aheejin. Herald added a project: clang.
Enable nontrapping-fptoint, sign-ext, bulk-memory, 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 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D125728 Files: clang/lib/Basic/Targets/WebAssembly.cpp Index: clang/lib/Basic/Targets/WebAssembly.cpp =================================================================== --- clang/lib/Basic/Targets/WebAssembly.cpp +++ clang/lib/Basic/Targets/WebAssembly.cpp @@ -144,6 +144,11 @@ Features["mutable-globals"] = true; Features["tail-call"] = true; setSIMDLevel(Features, SIMD128, true); + } else if (CPU == "generic") { + Features["nontrapping-fptoint"] = true; + Features["sign-ext"] = true; + Features["bulk-memory"] = true; + Features["mutable-globals"] = true; } return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec);
Index: clang/lib/Basic/Targets/WebAssembly.cpp =================================================================== --- clang/lib/Basic/Targets/WebAssembly.cpp +++ clang/lib/Basic/Targets/WebAssembly.cpp @@ -144,6 +144,11 @@ Features["mutable-globals"] = true; Features["tail-call"] = true; setSIMDLevel(Features, SIMD128, true); + } else if (CPU == "generic") { + Features["nontrapping-fptoint"] = true; + Features["sign-ext"] = true; + Features["bulk-memory"] = true; + Features["mutable-globals"] = true; } return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits