summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/WebAssembly/inline-asm.ll
Commit message (Collapse)AuthorAgeFilesLines
* [WebAssembly] Revise the strategy for inline asm.Dan Gohman2017-11-081-23/+33
| | | | | | | | | | | | | | | | | | | | | | Previously, an "r" constraint would mean the compiler provides a value on WebAssembly's operand stack. This was tricky to use properly, particularly since it isn't possible to declare a new local from within an inline asm string. With this patch, "r" provides the value in a WebAssembly local, and the local index is provided to the inline asm string. This requires inline asm to use get_local and set_local to read the register. This does potentially result in larger code size, however inline asm should hopefully be quite rare in WebAssembly. This also means that the "m" constraint can no longer be supported, as WebAssembly has nothing like a "memory operand" that includes an implicit get_local. This fixes PR34599 for the wasm32-unknown-unknown-wasm target (though not for the ELF target). llvm-svn: 317707
* [WebAssembly] Convert the remaining unit tests to the new wasm-object-file ↵Dan Gohman2017-02-281-3/+2
| | | | | | | | | | | target. To facilitate this, add a new hidden command-line option to disable the explicit-locals pass. That causes llc to emit invalid code that doesn't have all locals converted to get_local/set_local, however it simplifies testwriting in many cases. llvm-svn: 296540
* [WebAssembly] Remove the output operand from stores.Dan Gohman2016-10-061-2/+2
| | | | | | | | | Per spec changes, store instructions in WebAssembly no longer have a return value. Update the instruction descriptions. Differential Revision: https://reviews.llvm.org/D25122 llvm-svn: 283501
* [WebAssembly] Optimize away return instructions using fallthroughs.Dan Gohman2016-05-211-1/+1
| | | | | | | | | This saves a small amount of code size, and is a first small step toward passing values on the stack across block boundaries. Differential Review: http://reviews.llvm.org/D20450 llvm-svn: 270294
* [WebAssembly] Rename $discard to $drop in the assembly output.Dan Gohman2016-05-171-2/+2
| | | | llvm-svn: 269862
* [WebAssembly] Fix a test to work even when the integrated assembler is enabled.Dan Gohman2016-01-121-2/+3
| | | | | | | Add -no-integrated-as to this test, since it's testing inline asm strings that aren't actually valid assembly syntax. llvm-svn: 257519
* [WebAssembly] Add -m:e to the target triple.Dan Gohman2016-01-071-1/+1
| | | | | | | This enables ELF-style name mangling, which primarily means using ".L" for private symbols. llvm-svn: 257020
* [WebAssembly] Use the new offset syntax for memory operands in inline asm.Dan Gohman2015-12-161-1/+1
| | | | llvm-svn: 255788
* [WebAssembly] Support more kinds of inline asm operandsDan Gohman2015-12-161-0/+15
| | | | llvm-svn: 255782
* [WebAssembly] Tighten up several CHECK tests.Dan Gohman2015-12-101-1/+1
| | | | llvm-svn: 255255
* [WebAssembly] Support inline asm constraints of type i16 and similar.Dan Gohman2015-12-051-0/+16
| | | | llvm-svn: 254861
* [WebAssembly] Fix inline asm support for i64 operands.Dan Gohman2015-11-251-0/+13
| | | | llvm-svn: 254106
* [WebAssembly] Emit .param, .result, and .local through MC.Dan Gohman2015-11-231-2/+1
| | | | | | This eliminates one of the main remaining uses of EmitRawText. llvm-svn: 253878
* [WebAssembly] Make bogus inline asm strings in tests be comments.Dan Gohman2015-11-181-6/+6
| | | | | | | These tests aren't testing that the result is valid syntax; they're testing that the compiler emits the inline asm operands correctly. llvm-svn: 253469
* [WebAssembly] Enable register coloring and register stackifying.Dan Gohman2015-11-181-7/+5
| | | | | | | | | | | | | | | | This also takes the push/pop syntax another step forward, introducing stack slot numbers to make it easier to see how expressions are connected. For example, the value pushed in $push7 is popped in $pop7. And, this begins an experiment with making get_local and set_local implicit when an operation directly uses or defines a register. This greatly reduces clutter. If this experiment succeeds, it may make sense to do this for const instructions as well. And, this introduces more special code for ARGUMENTS; hopefully this code will soon be obviated by proper support for live-in virtual registers. llvm-svn: 253465
* [WebAssembly] Inline asm support.Dan Gohman2015-11-131-0/+53
llvm-svn: 252997
OpenPOWER on IntegriCloud