summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/MCTargetDesc
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* [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-125-15/+193
| | | | | | | 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-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | 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-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] Register the MC subtarget info.Dan Gohman2016-01-121-0/+8
| | | | llvm-svn: 257439
* [WebAssembly] Define OperandTypes for decoding immediate values.Dan Gohman2016-01-121-11/+21
| | | | llvm-svn: 257438
* [WebAssembly] Use TSFlags instead of keeping a list of special-case opcodes.Dan Gohman2016-01-121-0/+11
| | | | llvm-svn: 257433
* [WebAssembly] Define WebAssembly-specific relocation codes.Dan Gohman2016-01-111-2/+17
| | | | | | | | 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] Minor code cleanups. NFC.Dan Gohman2016-01-082-5/+3
| | | | llvm-svn: 257131
* [WebAssembly] Minor code cleanups. NFC.Dan Gohman2016-01-081-6/+0
| | | | llvm-svn: 257128
* [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] 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] Remove an unneeded empty destructor.Dan Gohman2015-12-211-4/+0
| | | | llvm-svn: 256167
* 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] Experimental ELF writer supportDan Gohman2015-12-176-0/+288
| | | | | | | | | 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] Trim some unneeded #includes.Dan Gohman2015-12-081-1/+0
| | | | llvm-svn: 254994
* [WebAssembly] Minor clang-format and selected clang-tidy cleanups. NFC.Dan Gohman2015-11-291-2/+2
| | | | llvm-svn: 254267
* [WebAssembly] Remove incomplete MCCodeEmitter bits.Dan Gohman2015-11-232-4/+0
| | | | | | These are parts of a separate patch that I accidentally included in r253878. llvm-svn: 253892
* [WebAssembly] Emit .param, .result, and .local through MC.Dan Gohman2015-11-233-1/+10
| | | | | | This eliminates one of the main remaining uses of EmitRawText. llvm-svn: 253878
* [WebAssembly] Add WebAssemblyMCInstLower.cpp.Dan Gohman2015-11-051-0/+9
| | | | | | | This isn't used yet; it's just a start towards eventually using MC to do instruction printing, and eventually binary encoding. llvm-svn: 252194
* [WebAssembly] Switch to a more traditional assembly syntaxDan Gohman2015-10-061-10/+0
| | | | | | | | | | | 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
* WebAssembly: add small FIXME for AsmPrinter.JF Bastien2015-08-261-0/+1
| | | | | | Suggested by @sunfish as a follow-up to r245982. llvm-svn: 245996
* WebAssembly: comment out .globl when printing textual assemblyJF Bastien2015-08-251-1/+4
| | | | | | Do the same for .weak (not implemented for now, but may as well to it). Update comment string to two semicolons. llvm-svn: 245982
* WebAssembly: MCAsmInfo only has one syntax variant for now.JF Bastien2015-07-281-5/+3
| | | | | | | | | | Summary: MCAsmInfo is set up with the default AssemblerDialect, which is zero. Subscribers: llvm-commits, sunfish, jfb Differential Revision: http://reviews.llvm.org/D11567 llvm-svn: 243452
* WebAssembly: more MCAsmInfo nits.JF Bastien2015-07-271-5/+1
| | | | | | | | | | Summary: As suggested by sunfish. Subscribers: jfb, llvm-commits, sunfish Differential Revision: http://reviews.llvm.org/D11544 llvm-svn: 243339
* WebAssembly: minor MCAsmInfo fixesJF Bastien2015-07-271-1/+8
| | | | | | | | | | | | Summary: Fix pointer / callee-save stack sto size. Update comment character to be LISP-ish. Subscribers: llvm-commits, sunfish, jfb Differential Revision: http://reviews.llvm.org/D11537 llvm-svn: 243326
* WebAssembly: basic bitcode → assembly CodeGen testJF Bastien2015-07-222-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add a basic CodeGen bitcode test which (for now) only prints out the function name and nothing else. The current code merely implements the basic needed for the test run to not crash / assert. Getting to that point required: - Basic InstPrinter. - Basic AsmPrinter. - DiagnosticInfoUnsupported (not strictly required, but nice to have, duplicated from AMDGPU/BPF's ISelLowering). - Some SP and register setup in WebAssemblyTargetLowering. - Basic LowerFormalArguments. - GenInstrInfo. - Placeholder LowerFormalArguments. - Placeholder CanLowerReturn and LowerReturn. - Basic DAGToDAGISel::Select, which requiresGenDAGISel.inc as well as GET_INSTRINFO_ENUM with GenInstrInfo.inc. - Remove WebAssemblyFrameLowering::determineCalleeSaves and rely on default. - Implement WebAssemblyFrameLowering::hasFP, same as AArch64's implementation. Follow-up patches will implement a real AsmPrinter, which will require adding MI opcodes specific to WebAssembly. Reviewers: sunfish Subscribers: aemerson, jfb, llvm-commits Differential Revision: http://reviews.llvm.org/D11369 llvm-svn: 242939
* WebAssembly: basic instructions todo, and basic register info.JF Bastien2015-07-102-0/+6
| | | | | | | | | | | | | | Summary: This code is based on AArch64 for modern backend good practice, and NVPTX for virtual ISA concerns. Reviewers: sunfish Subscribers: aemerson, llvm-commits, jfb Differential Revision: http://reviews.llvm.org/D11070 llvm-svn: 241923
* [WebAssembly] Define separate Target instances for 32-bit and 64-bit.Dan Gohman2015-07-012-2/+3
| | | | llvm-svn: 241193
* [WebAssembly] Initial WebAssembly backendDan Gohman2015-06-297-0/+236
This WebAssembly backend is just a skeleton at this time and is not yet functional. llvm-svn: 241022
OpenPOWER on IntegriCloud