[PATCH] D41941: [WebAssembly] Change int_fast16_t to 32-bit

2018-01-11 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw added inline comments. Comment at: lib/Basic/Targets/WebAssembly.h:108 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { -// WebAssembly uses long long for int_least64_t and int_fast64_t. -return BitWidth == 64 +// WebAssembly uses

[PATCH] D41941: [WebAssembly] Change int_fast16_t to 32-bit

2018-01-11 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw added inline comments. Comment at: lib/Basic/Targets/WebAssembly.h:108 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { -// WebAssembly uses long long for int_least64_t and int_fast64_t. -return BitWidth == 64 +// WebAssembly uses

[PATCH] D41941: [WebAssembly] Change int_fast16_t to 32-bit

2018-01-11 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw added inline comments. Comment at: lib/Basic/Targets/WebAssembly.h:108 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { -// WebAssembly uses long long for int_least64_t and int_fast64_t. -return BitWidth == 64 +// WebAssembly uses

[PATCH] D41941: [WebAssembly] Change int_fast16_t to 32-bit

2018-01-11 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw created this revision. ncw added reviewers: sunfish, dschuff. Herald added subscribers: cfe-commits, aheejin, jgravelle-google, sbc100, jfb. See: https://bugs.llvm.org/show_bug.cgi?id=35582 Since Wasm has to use 32-to-16 bit instructions to narrow values down, 32-bit should be a tad faster f

[PATCH] D41073: Wasm: add support in libcxx

2017-12-16 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw updated this revision to Diff 127242. ncw added a comment. Herald added a subscriber: krytarowski. Although Dan has already reviewed, I've sneakily added in another change here to help compilation against Musl. Musl is Linux-only, or rather, provides the linux ABI. For Wasm, `__linux` isn't

[PATCH] D41073: Wasm: add support in libcxx

2017-12-11 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw created this revision. Herald added subscribers: cfe-commits, aheejin, jfb. Herald added a reviewer: EricWF. It turns out that this is the only change required in libcxx for it to compile with the new `wasm32-unknown-unknown-wasm` target recently added to Clang. I haven't done much testing o

[PATCH] D40738: Don't use Wasm function sections for more than one function

2017-12-05 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw added a comment. Thanks for the review @sunfish (and for the other input you've given). Could you land this for me Dan, as I don't have commit access? Thanks. Repository: rC Clang https://reviews.llvm.org/D40738 ___ cfe-commits mailing list

[PATCH] D40739: Pass through --undefined to Wasm LLD

2017-12-02 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw added a comment. I'm glad to be involved in a small way. Our company uses Emscripten in one of our products, and some of our employees were early contributors to Emscripten years ago, when they were trying to get C++ working. Now I've been allowed to spend a few weeks "investigating" Wasm,

[PATCH] D40739: Pass through --undefined to Wasm LLD

2017-12-01 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw added a comment. I didn't know it existed either, and you're right it's odd that it doesn't appear in the help text... However it duly exists and is implemented in clang/lib/Driver/ToolChains/Gnu.cpp, without any note that it's deprecated. `man gcc` documents it. Repository: rC Clang h

[PATCH] D40739: Pass through --undefined to Wasm LLD

2017-12-01 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw updated this revision to Diff 125176. ncw added a comment. (D'oh, more trouble with arcane commands getting diffs into phabricator... sorry for the spam.) Repository: rC Clang https://reviews.llvm.org/D40739 Files: lib/Driver/ToolChains/WebAssembly.cpp Index: lib/Driver/ToolChains/W

[PATCH] D40739: Pass through --undefined to Wasm LLD

2017-12-01 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw created this revision. Herald added subscribers: cfe-commits, sunfish, aheejin, jgravelle-google, dschuff, jfb, klimek. This is a follow-on to https://reviews.llvm.org/D40724 (Wasm entrypoint changes #1, add `--undefined` argument to LLD). Repository: rC Clang https://reviews.llvm.org/D

[PATCH] D40738: Don't use Wasm function sections for more than one function

2017-12-01 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw created this revision. Herald added subscribers: cfe-commits, aheejin, sbc100, dschuff, jfb. Fixes Bugzilla https://bugs.llvm.org/show_bug.cgi?id=35467 If a Wasm function section is created with more than one symbol, WasmObjectWriter fails with the following message: "function sections must