| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 252003
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add support for wasm's select operator, and lower LLVM's select DAG node
to it.
Reviewers: sunfish
Subscribers: dschuff, llvm-commits, jfb
Differential Revision: http://reviews.llvm.org/D14295
llvm-svn: 252002
|
|
|
|
| |
llvm-svn: 251859
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Imports should be generated like (param i32 f32...) not (param i32) (param f32) ...
Author: binji
Reviewers: jfb
Subscribers: jfb, dschuff
llvm-svn: 251714
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Conversion opcode name format should be f64.convert_u/i64 not f64_convert_u
Author: s3ththompson
Reviewers: jfb
Subscribers: sunfish, jfb, llvm-commits, dschuff
Differential Revision: http://reviews.llvm.org/D14160
llvm-svn: 251613
|
|
|
|
|
|
|
| |
br_if shouldn't start with a dot.
div and rem went from prefix u/s to suffix.
llvm-svn: 250972
|
|
|
|
|
|
| |
C/C++ code can declare an extern function, which will show up as an import in WebAssembly's output. It's expected that the linker will resolve these, and mark unresolved imports as call_import (I have a patch which does this in wasmate).
llvm-svn: 250875
|
|
|
|
|
|
| |
They are now typeless, unlike other operations.
llvm-svn: 250793
|
|
|
|
| |
llvm-svn: 250777
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This is a temporary hack until we get around to remapping the vreg
numbers to local numbers. Dead vregs cause bad numbering and make
consumers sad.
We could also just look at debug info an use named locals instead, but
vregs have to work properly anyways so there!
Reviewers: binji, sunfish
Subscribers: jfb, llvm-commits, dschuff
Differential Revision: http://reviews.llvm.org/D13839
llvm-svn: 250594
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: It has also slightly changed.
Reviewers: binji
Subscribers: jfb, dschuff, llvm-commits, sunfish
Differential Revision: http://reviews.llvm.org/D13837
llvm-svn: 250591
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: The syntax has changed a bit recently.
Reviewers: binji
Subscribers: llvm-commits, jfb, sunfish, dschuff
Differential Revision: http://reviews.llvm.org/D13821
llvm-svn: 250535
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Make the relooper an analysis pass, to convert CFG to AST.
Reviewers: sunfish
Subscribers: jfb, dschuff
Differential Revision: http://reviews.llvm.org/D12744
llvm-svn: 250524
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Follow the same syntax as for the spec repo. Both have evolved slightly
independently and need to converge again.
This, along with wasmate changes, allows me to do the following:
echo "int add(int a, int b) { return a + b; }" > add.c
./out/bin/clang -O2 -S --target=wasm32-unknown-unknown add.c -o add.wack
./experimental/prototype-wasmate/wasmate.py add.wack > add.wast
./sexpr-wasm-prototype/out/sexpr-wasm add.wast -o add.wasm
./sexpr-wasm-prototype/third_party/v8-native-prototype/v8/v8/out/Release/d8 -e "print(WASM.instantiateModule(readbuffer('add.wasm'), {print:print}).add(42, 1337));"
As you'd expect, the d8 shell prints out the right value.
Reviewers: sunfish
Subscribers: jfb, llvm-commits, dschuff
Differential Revision: http://reviews.llvm.org/D13712
llvm-svn: 250480
|
|
|
|
| |
llvm-svn: 250233
|
|
|
|
| |
llvm-svn: 249859
|
|
|
|
|
|
|
|
|
|
|
| |
This new syntax is built around putting each instruction on its own line
in a "mnemonic op, op, op" like syntax. It also uses conventional data
section directives like ".byte" and so on rather than requiring everything
to be in hierarchical S-expression format. This is a more natural syntax
for a ".s" file format from the perspective of LLVM MC and related tools,
while remaining easy to translate into other forms as needed.
llvm-svn: 249364
|
|
|
|
|
|
|
| |
This is a temporary assembly syntax that will likely evolve along with
broader upcoming syntax changes.
llvm-svn: 249225
|
|
|
|
| |
llvm-svn: 249218
|
|
|
|
| |
llvm-svn: 249187
|
|
|
|
| |
llvm-svn: 249184
|
|
|
|
| |
llvm-svn: 249178
|
|
|
|
| |
llvm-svn: 249171
|
|
|
|
| |
llvm-svn: 248716
|
|
|
|
| |
llvm-svn: 248644
|
|
|
|
|
|
|
|
|
|
| |
This reverts r248388 and fixes the underlying bug: hasAddr64 was initialized
in runOnMachineFunction, but runOnMachineFunction isn't ever called in
CodeGen/WebAssembly/global.ll since that testcase has no functions. The fix
here is to use AsmPrinter's getPointerSize() as needed to determine the
pointer size instead.
llvm-svn: 248394
|
|
|
|
| |
llvm-svn: 248388
|
|
|
|
| |
llvm-svn: 247870
|
|
|
|
|
|
|
|
|
|
|
|
| |
This pass implements a simple algorithm for conversion from CFG to
wasm's structured control flow. It doesn't yet handle multiple-entry
loops; that will be added in a future patch.
It also adds initial support for switch statements.
Differential Revision: http://reviews.llvm.org/D12735
llvm-svn: 247818
|
|
|
|
| |
llvm-svn: 247649
|
|
|
|
| |
llvm-svn: 247158
|
|
|
|
| |
llvm-svn: 247152
|
|
|
|
| |
llvm-svn: 247118
|
|
|
|
| |
llvm-svn: 247110
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CodeGen passes
This allows backends which don't use a traditional register allocator,
but do need PHI lowering and other passes, to use the default
TargetPassConfig::addFastRegAlloc and
TargetPassConfig::addOptimizedRegAlloc implementations.
Differential Revision: http://reviews.llvm.org/D12691
llvm-svn: 247065
|
|
|
|
|
|
| |
Renamed from: https://github.com/WebAssembly/design/pull/332
llvm-svn: 247028
|
|
|
|
| |
llvm-svn: 247008
|
|
|
|
|
|
|
|
|
| |
Summary: This handles all load/store operations that WebAssembly defines, and handles those necessary for C++ such as i1. I left a FIXME for outstanding features which aren't required for now.
Reviewers: sunfish
Subscribers: jfb, llvm-commits, dschuff
llvm-svn: 246500
|
|
|
|
| |
llvm-svn: 246101
|
|
|
|
|
|
|
|
|
|
|
|
| |
Things of note:
- Other linkage types aren't handled yet. We'll figure it out with dynamic linking.
- Special LLVM globals are either ignored, or error out for now.
- TLS isn't supported yet (WebAssembly will have threads later).
- There currently isn't a syntax for alignment, I left it in a comment so it's easy to hook up.
- Undef is convereted to whatever the type's appropriate null value is.
- assert versus report_fatal_error: follow what other AsmPrinters do, and assert only on what should have been caught elsewhere.
llvm-svn: 246092
|
|
|
|
|
|
| |
Suggested by @sunfish as a follow-up to r245982.
llvm-svn: 245996
|
|
|
|
|
|
| |
WebAssembly will either use globals or immediates, since it's a virtual ISA.
llvm-svn: 245989
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Match spec format: https://github.com/WebAssembly/spec/blob/master/ml-proto/test/fac.wasm
Reviewers: sunfish
Subscribers: llvm-commits, jfb
Differential Revision: http://reviews.llvm.org/D12307
llvm-svn: 245986
|
|
|
|
|
|
| |
Do the same for .weak (not implemented for now, but may as well to it). Update comment string to two semicolons.
llvm-svn: 245982
|
|
|
|
| |
llvm-svn: 245893
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Support function calls.
Reviewers: sunfish, sunfishcode
Subscribers: sunfishcode, jfb, llvm-commits
Differential revision: http://reviews.llvm.org/D12219
llvm-svn: 245887
|
|
|
|
|
|
|
|
|
|
| |
Summary: I forgot to squash git commits before doing an svn dcommit of D12219. Reverting, and re-submitting.
Subscribers: jfb, llvm-commits
Differential Revision: http://reviews.llvm.org/D12298
llvm-svn: 245886
|
|
|
|
| |
llvm-svn: 245883
|
|
|
|
| |
llvm-svn: 245882
|
|
|
|
| |
llvm-svn: 245875
|