1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 22:42:46 +02:00
llvm-mirror/lib/Target/WebAssembly/MCTargetDesc
Dan Gohman e122783b00 [WebAssembly] Make CFG stackification independent of basic-block labels.
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
2016-01-12 19:14:46 +00:00
..
CMakeLists.txt [WebAssembly] Experimental ELF writer support 2015-12-17 01:39:00 +00:00
LLVMBuild.txt
Makefile
WebAssemblyAsmBackend.cpp [WebAssembly] Remove unused arguments, unused functions. NFC. 2016-01-08 00:43:54 +00:00
WebAssemblyELFObjectWriter.cpp [WebAssembly] Define WebAssembly-specific relocation codes. 2016-01-11 23:38:05 +00:00
WebAssemblyMCAsmInfo.cpp WebAssembly: use .skip instead of .zero directive 2016-01-07 23:18:29 +00:00
WebAssemblyMCAsmInfo.h [WebAssembly] Switch WebAssemblyMCAsmInfo.h from MCAsmInfo to MCAsmInfoELF. 2015-12-17 20:50:45 +00:00
WebAssemblyMCCodeEmitter.cpp [WebAssembly] Implement a prototype instruction encoder and disassembler. 2016-01-12 03:32:29 +00:00
WebAssemblyMCTargetDesc.cpp [WebAssembly] Register the MC subtarget info. 2016-01-12 03:30:06 +00:00
WebAssemblyMCTargetDesc.h [WebAssembly] Make CFG stackification independent of basic-block labels. 2016-01-12 19:14:46 +00:00