summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly
Commit message (Collapse)AuthorAgeFilesLines
* [WebAssembly] Add some more README.txt entries.Dan Gohman2016-01-161-0/+10
| | | | llvm-svn: 257969
* [WebAssembly] Don't create a needless .note.GNU-stack sectionDan Gohman2016-01-151-0/+3
| | | | | | | | | | WebAssembly's stack will never be executable by default, so it isn't necessary to declare .note.GNU-stack sections to request a non-executable stack. Differential Revision: http://reviews.llvm.org/D15969 llvm-svn: 257962
* Update to use new name alignTo().Rui Ueyama2016-01-141-5/+5
| | | | llvm-svn: 257804
* WebAssembly: mark a few new failuresJF Bastien2016-01-141-0/+8
| | | | | | | | | | | | A recent change introduced this assertion failure in some corner cases. Repro: mkdir /s/wasm/torture-out ; time /s/wasm/waterfall/src/compile_torture_tests.py --c /s/llvm/out/bin/clang --cxx /s/llvm/out/bin/clang++ --testsuite /s/gcc/gcc/testsuite --fails /s/llvm/llvm/lib/Target/WebAssembly/known_gcc_test_failures.txt --out /s/wasm/torture-out Or look on the wasm integration bot: https://build.chromium.org/p/client.wasm.llvm/console llvm-svn: 257733
* WebAssembly: fix build break introduced by ELFObjectWriter churnJF Bastien2016-01-131-3/+4
| | | | llvm-svn: 257709
* [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
* [WebAssemly] Invalidate liveness in CFG stackifierDerek Schuff2016-01-131-0/+3
| | | | | | | WebAssemblyCFGStackify does not track liveness for EXPR_STACK, causing verifier failure if liveness has not already been invalidated. llvm-svn: 257620
* [WebAssembly] Fix disassembler shared-libs buildDerek Schuff2016-01-121-1/+2
| | | | llvm-svn: 257536
* [WebAsssembly] Register the MC register info.Dan Gohman2016-01-121-0/+9
| | | | llvm-svn: 257525
* [WebAssembly] Add a EM_WEBASSEMBLY value, and several bits of code that use it.Dan Gohman2016-01-122-5/+3
| | | | | | | | | A request has been made to the official registry, but an official value is not yet available. This patch uses a temporary value in order to support development. When an official value is recieved, the value of EM_WEBASSEMBLY will be updated. llvm-svn: 257517
* [WebAssembly] Introduce a WebAssemblyTargetStreamer class.Dan Gohman2016-01-129-64/+225
| | | | | | | Refactor .param, .result, .local, and .endfunc, as directives, using the proper MCTargetStreamer mechanism, rather than fake instructions. llvm-svn: 257511
* [WebAssembly] Make CFG stackification independent of basic-block labels.Dan Gohman2016-01-128-82/+161
| | | | | | | | | | | | | | | | | | | | | | | This patch changes the way labels are referenced. Instead of referencing the basic-block label name (eg. .LBB0_0), instructions now just have an immediate which indicates the depth in the control-flow stack to find a label to jump to. This makes them much closer to what we expect to have in the binary encoding, and avoids the problem of basic-block label names not being explicit in the binary encoding. Also, it terminates blocks and loops with end_block and end_loop instructions, rather than basic-block label names, for similar reasons. This will also fix problems where two constructs appear to have the same label, because we no longer explicitly use labels, so consumers that need labels will presumably create their own labels, and presumably they won't reuse labels when they do. This patch does make the code a little more awkward to read; as a partial mitigation, this patch also introduces comments showing where the labels are, and comments on each branch showing where it's branching to. llvm-svn: 257505
* [WebAssembly] Implement a prototype instruction encoder and disassembler.Dan Gohman2016-01-127-24/+231
| | | | | | | 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] Register the MC subtarget info.Dan Gohman2016-01-121-0/+8
| | | | llvm-svn: 257439
* [WebAssembly] Define OperandTypes for decoding immediate values.Dan Gohman2016-01-122-13/+33
| | | | llvm-svn: 257438
* [WebAssembly] Use TSFlags instead of keeping a list of special-case opcodes.Dan Gohman2016-01-124-15/+54
| | | | llvm-svn: 257433
* [WebAssembly] Define WebAssembly-specific relocation codes.Dan Gohman2016-01-115-15/+58
| | | | | | | | Currently WebAssembly has two kinds of relocations; data addresses and function addresses. This adds ELF relocations for them, as well as an MC symbol kind to indicate which type of relocation is needed. llvm-svn: 257416
* [WebAssembly] Reorganize address offset folding.Dan Gohman2016-01-111-85/+161
| | | | | | | | | | | | | Always expect tglobaladdr and texternalsym to be wrapped in WebAssemblywrapper nodes. Also, split out a regPlusGA from regPlusImm so that it can special-case global addresses, as they can be folded in more cases. Unfortunately this doesn't enable any new optimizations yet due to SelectionDAG limitations. I'll be submitting changes to the SelectionDAG infrastructure, along with tests, in a separate patch. llvm-svn: 257394
* [WebAssembly] Minor code cleanups. NFC.Dan Gohman2016-01-082-5/+3
| | | | llvm-svn: 257131
* [WebAssembly] Minor code cleanups. NFC.Dan Gohman2016-01-084-11/+6
| | | | llvm-svn: 257128
* [WebAssembly] Remove an unused def : Pat.Dan Gohman2016-01-081-6/+4
| | | | | | | WebAssemblyISelLowering.cpp does not wrap jump table nodes inside of WebAssemblywrapper nodes, so this pattern is not currently used. llvm-svn: 257127
* [WebAssembly] Remove unused arguments, unused functions. NFC.Dan Gohman2016-01-084-50/+33
| | | | llvm-svn: 257125
* WebAssembly: use .skip instead of .zero directiveJF Bastien2016-01-071-0/+4
| | | | | | | | | | | | | | | | | .zero is confusing when used with two arguments. Documentation: This directive emits SIZE 0-valued bytes. SIZE must be an absolute expression. This directive is actually an alias for the '.skip' directive so in can take an optional second argument of the value to store in the bytes instead of zero. Using '.zero' in this way would be confusing however. Ref: https://sourceware.org/bugzilla/show_bug.cgi?id=18353 Hexagon and Sparc do the same, and it's all the same to WebAssembly so let's pick the less confusing of the two. llvm-svn: 257111
* WebAssembly: update expected failures, more assert got resolved.JF Bastien2016-01-071-2/+0
| | | | llvm-svn: 257098
* WebAssembly: update expected failures, assert got resolved by r257084.JF Bastien2016-01-071-18/+0
| | | | llvm-svn: 257093
* [WebAssembly] Support combining GEP and FrameIndex offsets in memory operand ↵Derek Schuff2016-01-071-6/+12
| | | | | | | | | | | offset field Previously we only supported putting the FI into memory operand offset fields if there was nothing there already. Now combine them. Differential Revision: http://reviews.llvm.org/D15941 llvm-svn: 257084
* [WebAssembly] Use the default private label prefixes.Dan Gohman2016-01-071-3/+0
| | | | | | | | | The MC assembler doesn't like using the empty string as a private label prefix because then it treats all labels as private. This commit reverts back to the default prefix, which is .L, which is common in ELF targets and consistent with the LLVM name mangler. llvm-svn: 257083
* [WebAssembly] Add -m:e to the target triple.Dan Gohman2016-01-071-2/+3
| | | | | | | This enables ELF-style name mangling, which primarily means using ".L" for private symbols. llvm-svn: 257020
* [WebAssembly] Don't use range-based loop for a list that's being modifiedDan Gohman2016-01-061-3/+5
| | | | | | | | The first instruction in a block is what the rend() iterator points to, so if it moves, we need to re-evaluate rend() so that we continue to iterate through the rest of the instructions. llvm-svn: 256953
* WebAssembly: add missing expected failures exposed by r256890JF Bastien2016-01-061-0/+1
| | | | llvm-svn: 256948
* WebAssembly: add new expected failures exposed by r256890JF Bastien2016-01-061-0/+17
| | | | llvm-svn: 256945
* Remove extra forward declarations and scrub includes for all in tree ↵Craig Topper2015-12-251-1/+0
| | | | | | InstPrinters. NFC llvm-svn: 256427
* [WebAssembly] Fix handling of COPY instructions in WebAssemblyRegStackify.Dan Gohman2015-12-254-58/+64
| | | | | | | | | | | | | Move RegStackify after coalescing and teach it to use LiveIntervals instead of depending on SSA form. This avoids a problem where a register in a COPY instruction is stackified and then subsequently coalesced with a register that is not stackified. This also puts it after the scheduler, which allows us to simplify the EXPR_STACK constraint, as we no longer have instructions being reordered after stackification and before coloring. llvm-svn: 256402
* [WebAssembly] Add a TODO comment for a possible future optimization.Dan Gohman2015-12-231-1/+2
| | | | llvm-svn: 256306
* [WebAssembly] Trim unneeded #includes. NFC.Dan Gohman2015-12-222-2/+0
| | | | llvm-svn: 256301
* [WebAssembly] Minor code simplification. NFC.Dan Gohman2015-12-221-1/+1
| | | | llvm-svn: 256300
* [WebAssembly] Convert a regular for loop to a range-based for loop.Dan Gohman2015-12-211-2/+1
| | | | llvm-svn: 256169
* [WebAssembly] Clean up comments and fix a missing #include dependency.Dan Gohman2015-12-211-13/+7
| | | | llvm-svn: 256168
* [WebAssembly] Remove an unneeded empty destructor.Dan Gohman2015-12-211-4/+0
| | | | llvm-svn: 256167
* [WebAssembly] Enclose the operand variables for load and store instructions ↵Dan Gohman2015-12-211-23/+23
| | | | | | | | | in braces. This allows the AsmMatcherEmitter to properly tokenize the AsmStrings for load and store instructions. This is a step towards asm parsing. llvm-svn: 256166
* [WebAssembly] Mark the ARGUMENT pseudo-instructions as CodeGenOnly.Dan Gohman2015-12-211-1/+1
| | | | llvm-svn: 256165
* [WebAssembly] Add some comments and make some minor source cleanups.Dan Gohman2015-12-211-3/+4
| | | | llvm-svn: 256164
* Remove unused class variables.Eric Christopher2015-12-171-5/+3
| | | | llvm-svn: 255939
* [WebAssembly] Switch WebAssemblyMCAsmInfo.h from MCAsmInfo to MCAsmInfoELF.Dan Gohman2015-12-171-2/+2
| | | | llvm-svn: 255925
* Fix unused variable warning in release builds. NFC.Diego Novillo2015-12-171-3/+1
| | | | llvm-svn: 255897
* [WebAssembly] Convert WebAssemblyTargetObjectFile to TargetLoweringObjectFileELFDan Gohman2015-12-174-42/+30
| | | | llvm-svn: 255877
* [WebAssembly] Experimental ELF writer supportDan Gohman2015-12-178-12/+291
| | | | | | | | | 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
* WebAssembly: update expected torture test failuresJF Bastien2015-12-171-14/+0
| | | | | | We now have 240 expected failures. llvm-svn: 255858
* [WebAssembly] Fix legalization of shift operators on large integer types.Dan Gohman2015-12-161-0/+7
| | | | llvm-svn: 255847
OpenPOWER on IntegriCloud