summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [WebAssembly] Make __attribute__((used)) not imply export.Dan Gohman2019-08-291-4/+6
| | | | | | | | | | Add an WASM_SYMBOL_NO_STRIP flag, so that __attribute__((used)) doesn't need to imply exporting. When targeting Emscripten, have WASM_SYMBOL_NO_STRIP imply exporting. Differential Revision: https://reviews.llvm.org/D62542 llvm-svn: 370415
* [WebAssembly] Rename wasm fixup kindsSam Clegg2019-03-281-3/+3
| | | | | | | | | | | These fixup kinds are not explicitly related to the code section. They are there to signal how to apply the fixup. Also, a couple of other minor wasm cleanups. Differential Revision: https://reviews.llvm.org/D59908 llvm-svn: 357145
* [WebAssembly] clang-tidy (NFC)Heejin Ahn2019-02-041-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes clang-tidy warnings on wasm-only files. The list of checks used is: `-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-identifier-naming,modernize-*` (LLVM's default .clang-tidy list is the same except it does not have `modernize-*`. But I've seen in multiple CLs in LLVM the modernize style was recommended and code was fixed based on the style, so I added it as well.) The common fixes are: - Variable names start with an uppercase letter - Function names start with a lowercase letter - Use `auto` when you use casts so the type is evident - Use inline initialization for class member variables - Use `= default` for empty constructors / destructors - Use `using` in place of `typedef` Reviewers: sbc100, tlively, aardappel Subscribers: dschuff, sunfish, jgravelle-google, yurydelendik, kripken, MatzeB, mgorny, rupprecht, llvm-commits Differential Revision: https://reviews.llvm.org/D57500 llvm-svn: 353075
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [WebAssembly] clang-format (NFC)Heejin Ahn2018-09-051-7/+7
| | | | | | | | | | | | Summary: This patch runs clang-format on all wasm-only files. Reviewers: aardappel, dschuff, sunfish, tlively Subscribers: MatzeB, sbc100, jgravelle-google, llvm-commits Differential Revision: https://reviews.llvm.org/D51447 llvm-svn: 341439
* [WebAssembly] Remove ELF file support.Sam Clegg2018-07-161-8/+6
| | | | | | | | | This support was partial and temporary. Now that we have wasm object file support its no longer needed. Differential Revision: https://reviews.llvm.org/D48744 llvm-svn: 337222
* Fix compilation of WebAssembly and RISCV after r334078Ilya Biryukov2018-06-061-3/+8
| | | | llvm-svn: 334085
* Simplified WebAssemblyAsmBackend by removing explicit ELF variant.Derek Schuff2018-06-041-82/+8
| | | | | | | | | | | | | The ELF version was broken (does not deal with wasm specific fixups), and now is slightly less broken. It will be removed in its entirety in the future which this change makes slightly easier (just remove the IsELF bool). Differential Revision: https://reviews.llvm.org/D47745 Patch by Wouter van Oortmerssen llvm-svn: 333964
* MC: Separate creating a generic object writer from creating a target object ↵Peter Collingbourne2018-05-211-10/+10
| | | | | | | | | | | | | writer. NFCI. With this we gain a little flexibility in how the generic object writer is created. Part of PR37466. Differential Revision: https://reviews.llvm.org/D47045 llvm-svn: 332868
* MC: Change MCAsmBackend::writeNopData() to take a raw_ostream instead of an ↵Peter Collingbourne2018-05-211-10/+10
| | | | | | | | | | | | | MCObjectWriter. NFCI. To make this work I needed to add an endianness field to MCAsmBackend so that writeNopData() implementations know which endianness to use. Part of PR37466. Differential Revision: https://reviews.llvm.org/D47035 llvm-svn: 332857
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-011-1/+1
| | | | | | | | | | | | | | | | We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46290 llvm-svn: 331272
* [WebAssembly] Update MCObjectWriter and associated interfaces after r315327Derek Schuff2017-10-101-4/+6
| | | | llvm-svn: 315335
* [WebAssembly] Fix build after r306177Derek Schuff2017-06-241-10/+14
| | | | llvm-svn: 306190
* [wasm] Fix WebAssembly asm backend after r305968Reid Kleckner2017-06-221-10/+12
| | | | llvm-svn: 305978
* 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
* Fix WebAssembly after r299529.Alexander Kornienko2017-04-051-4/+4
| | | | llvm-svn: 299535
* [WebAssembly] Add some comments and tidy up whitespace.Dan Gohman2017-02-271-1/+1
| | | | llvm-svn: 296402
* [WebAssembly] Basic support for Wasm object file encoding.Dan Gohman2017-02-241-6/+27
| | | | | | | | | 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 skeleton MC support for the Wasm container formatDan Gohman2017-02-221-2/+74
| | | | | | | | | This just adds the basic skeleton for supporting a new object file format. All of the actual encoding will be implemented in followup patches. Differential Revision: https://reviews.llvm.org/D26722 llvm-svn: 295803
* [WebAssembly] Implement more WebAssembly binary encoding.Dan Gohman2016-10-241-2/+4
| | | | | | | | | | | | 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
* Fix branch relaxation in 16-bit mode.Nirav Dave2016-07-111-1/+2
| | | | | | | | | | | | | | | Thread through MCSubtargetInfo to relaxInstruction function allowing relaxation to generate jumps with 16-bit sized immediates in 16-bit mode. This fixes PR22097. Reviewers: dwmw2, tstellarAMD, craig.topper, jyknight Subscribers: jfb, arsenm, jyknight, llvm-commits, dsanders Differential Revision: http://reviews.llvm.org/D20830 llvm-svn: 275068
* [WebAssembly] Add an assertion to catch unexpected MCFixupKindInfo flags.Dan Gohman2016-01-131-0/+2
| | | | llvm-svn: 257657
* [WebAssembly] MCFixupKindInfo's TargetSize is in bits rather than bytes.Dan Gohman2016-01-131-2/+2
| | | | llvm-svn: 257655
* [WebAssembly] Remove unused arguments, unused functions. NFC.Dan Gohman2016-01-081-4/+1
| | | | llvm-svn: 257125
* [WebAssembly] Experimental ELF writer supportDan Gohman2015-12-171-0/+103
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