summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [WebAssembly] Use __stack_pointer global when writing wasm binarySam Clegg2017-06-161-11/+7
| | | | | | | | | | | | | | | | | | This ensures that symbolic relocations are generated for stack pointer manipulations. These relocations are of type R_WEBASSEMBLY_GLOBAL_INDEX_LEB. This change also adds support for reading relocations of this type in WasmObjectFile.cpp. Since its a globally imported symbol this does mean that the get_global/set_global instruction won't be valid until the objects are linked that global used in no longer an imported global. Differential Revision: https://reviews.llvm.org/D34172 llvm-svn: 305616
* Sort the remaining #include lines in include/... and lib/....Chandler Carruth2017-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line with a #include and let it re-sort things according to the precise LLVM rules for include ordering baked into clang-format these days. I've reverted a number of files where the results of sorting includes isn't healthy. Either places where we have legacy code relying on particular include ordering (where possible, I'll fix these separately) or where we have particular formatting around #include lines that I didn't want to disturb in this patch. This patch is *entirely* mechanical. If you get merge conflicts or anything, just ignore the changes in this patch and run clang-format over your #include lines in the files. Sorry for any noise here, but it is important to keep these things stable. I was seeing an increasing number of patches with irrelevant re-ordering of #include lines because clang-format was used. This patch at least isolates that churn, makes it easy to skip when resolving conflicts, and gets us to a clean baseline (again). llvm-svn: 304787
* [WebAssembly] Encode block signatures as SLEB instead of ULEBDerek Schuff2017-04-171-0/+2
| | | | | | | | Use SLEB (varint) for block_type immediates in accordance with the spec. Patch by Yury Delendik llvm-svn: 300490
* [WebAssembly] Basic support for Wasm object file encoding.Dan Gohman2017-02-241-8/+34
| | | | | | | | | With the "wasm32-unknown-unknown-wasm" triple, this allows writing out simple wasm object files, and is another step in a larger series toward migrating from ELF to general wasm object support. Note that this code and the binary format itself is still experimental. llvm-svn: 296190
* [WebAssembly] Add a cast to void to fix an unused private member warning, ↵Dan Gohman2017-02-161-1/+3
| | | | | | for now. llvm-svn: 295327
* [WebAssembly] Pass an MCContext to WebAssemblyMCCodeEmitter. NFC.Dan Gohman2017-02-101-3/+6
| | | | llvm-svn: 294679
* [WebAssembly] Add an "explicit" keyword to a constructor.Dan Gohman2016-12-221-1/+1
| | | | llvm-svn: 290345
* [WebAssembly] Implement more WebAssembly binary encoding.Dan Gohman2016-10-241-10/+15
| | | | | | | | | | | | This changes locals from being declared by the emitLocal hook in WebAssemblyTargetStreamer, rather than with an instruction. After exploring the infastructure in LLVM more, this seems to make more sense since declaring locals doesn't use an encoded opcode. This also adds more 0xd opcodes, type encodings, and miscellaneous binary encoding bits. llvm-svn: 285040
* [WebAssembly] Add an option to make get_local/set_local explicit.Dan Gohman2016-10-241-13/+38
| | | | | | | | | | This patch adds a pass, controlled by an option and off by default for now, for making implicit get_local/set_local explicit. This simplifies emitting wasm with MC. Differential Revision: https://reviews.llvm.org/D25836 llvm-svn: 285009
* Fix the wasm build by including EndianStream.hReid Kleckner2016-06-231-0/+1
| | | | llvm-svn: 273591
* [WebAssembly] Minor code cleanups. NFC.Dan Gohman2016-01-201-3/+3
| | | | llvm-svn: 258294
* [WebAssembly] Remove an unused data member. NFC.Dan Gohman2016-01-191-6/+4
| | | | llvm-svn: 258192
* [WebAssembly] Implement a prototype instruction encoder and disassembler.Dan Gohman2016-01-121-23/+39
| | | | | | | This is using an extremely simple temporary made-up binary format, not the official binary format (which isn't defined yet). llvm-svn: 257440
* [WebAssembly] Minor code cleanups. NFC.Dan Gohman2016-01-081-2/+0
| | | | llvm-svn: 257131
* [WebAssembly] Remove unused arguments, unused functions. NFC.Dan Gohman2016-01-081-24/+2
| | | | llvm-svn: 257125
* Remove unused class variables.Eric Christopher2015-12-171-5/+3
| | | | llvm-svn: 255939
* Fix unused variable warning in release builds. NFC.Diego Novillo2015-12-171-3/+1
| | | | llvm-svn: 255897
* [WebAssembly] Experimental ELF writer supportDan Gohman2015-12-171-0/+104
This creates the initial infrastructure for writing ELF output files. It doesn't yet have any implementation for encoding instructions. Differential Revision: http://reviews.llvm.org/D15555 llvm-svn: 255869
OpenPOWER on IntegriCloud