1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/MC
Michael Trent 721829227e [ MC ] Match labels to existing fragments even when switching sections.
(This commit restores the original branch (4272372c571) and applies an
additional change dropped from the original in a bad merge. This change
should address the previous bot failures. Both changes reviewed by pete.)

Summary:
This commit builds upon Derek Schuff's 2014 commit for attaching labels to
existing fragments ( Diff Revision: http://reviews.llvm.org/D5915 )

When temporary labels appear ahead of a fragment, MCObjectStreamer will
track the temporary label symbol in a "Pending Labels" list. Labels are
associated with fragments when a real fragment arrives; otherwise, an empty
data fragment will be created if the streamer's section changes or if the
stream finishes.

This commit moves the "Pending Labels" list into each MCStream, so that
this label-fragment matching process is resilient to section changes. If
the streamer emits a label in a new section, switches to another section to
do other work, then switches back to the first section and emits a
fragment, that initial label will be associated with this new fragment.
Labels will only receive empty data fragments in the case where no other
fragment exists for that section.

The downstream effects of this can be seen in Mach-O relocations. The
previous approach could produce local section relocations and external
symbol relocations for the same data in an object file, and this mix of
relocation types resulted in problems in the ld64 Mach-O linker. This
commit ensures relocations triggered by temporary labels are consistent.

Reviewers: pete, ab, dschuff

Reviewed By: pete, dschuff

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71368
2019-12-18 09:55:54 -08:00
..
AArch64 [AArch64][v8.3a] Don't emit LDRA '[xN]!' alias in disassembly. 2019-11-28 15:31:59 +00:00
AMDGPU [AMDGPU][MC][GFX10] Enabled v_movrel*[sdwa|dpp|dpp8] opcodes 2019-11-18 17:23:40 +03:00
ARM [llvm-readelf] - Change letters used for SHF_ARM_PURECODE and SHF_X86_64_LARGE flags. 2019-12-18 11:31:58 +03:00
AsmParser MCObjectStreamer: assign MCSymbols in the dummy fragment to offset 0. 2019-11-16 09:52:07 -05:00
AVR Fixup AVR tests to reflect changes in addend format in llvm-objdump 2019-11-19 15:32:58 +00:00
BPF
COFF [MC] Produce proper section relative relocations for COFF in .debug_frame 2019-11-27 10:44:42 +02:00
Disassembler [AArch64][v8.3a] Don't emit LDRA '[xN]!' alias in disassembly. 2019-11-28 15:31:59 +00:00
ELF [llvm-readobj] - Fix letters used for dumping section types in GNU style. 2019-12-13 11:31:24 +03:00
Hexagon
Lanai
MachO [ MC ] Match labels to existing fragments even when switching sections. 2019-12-18 09:55:54 -08:00
Mips [mips] Fix sc, scs, ll, lld instructions expanding 2019-11-27 00:43:25 +03:00
MSP430
PowerPC [MC][PowerPC] Fix a crash when redefining a symbol after .set 2019-12-13 09:31:54 -08:00
RISCV [RISCV][NFC] Trivial cleanup 2019-12-17 11:44:35 +00:00
Sparc
SystemZ [SystemZ] Improve handling of huge PC relative immediate offsets. 2019-11-04 10:38:18 +01:00
WebAssembly [WebAssembly] Implement SIMD {i8x16,i16x8}.avgr_u instructions 2019-12-17 15:05:50 -08:00
X86 [X86][MC] no error diagnostic for out-of-range jrcxz/jecxz/jcxz 2019-11-26 14:32:17 +03:00