llvm/lib/MC
Martin Storsjo b7c80c3cd2 [ARM] Clear the constant pool cache on explicit .ltorg directives
Multiple ldr pseudoinstructions with the same constant value will
reuse the same constant pool entry. However, if the constant pool
is explicitly flushed with a .ltorg directive, we should not try
to reference constants in the previous pool any longer, since they
may be out of range.

This fixes assembling hand-written assembler source which repeatedly
loads the same constant value, across a binary size larger than the
pc-relative fixup range for ldr instructions (4096 bytes). Such
assembler source already uses explicit .ltorg instructions to emit
constant pools with regular intervals. However if we try to reuse
constants emitted in earlier pools, they end up out of range.

This makes the output of the testcase match what binutils gas does
(prior to this patch, it would fail to assemble).

Differential Revision: https://reviews.llvm.org/D32847

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302416 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-08 10:26:24 +00:00
..
MCDisassembler
MCParser [LLVM][inline-asm][Altmacor] Altmacro string delimiter '<..>' 2017-05-04 10:37:00 +00:00
CMakeLists.txt
ConstantPools.cpp [ARM] Clear the constant pool cache on explicit .ltorg directives 2017-05-08 10:26:24 +00:00
ELFObjectWriter.cpp [MC] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). 2017-04-26 22:31:39 +00:00
LLVMBuild.txt
MachObjectWriter.cpp
MCAsmBackend.cpp
MCAsmInfo.cpp
MCAsmInfoCOFF.cpp
MCAsmInfoDarwin.cpp
MCAsmInfoELF.cpp
MCAsmInfoWasm.cpp
MCAsmStreamer.cpp This patch closes PR#32216: Better testing of schedule model instruction latencies/throughputs. 2017-04-14 07:44:23 +00:00
MCAssembler.cpp Add MCContext argument to MCAsmBackend::applyFixup for error reporting 2017-04-05 10:16:14 +00:00
MCCodeEmitter.cpp
MCCodeView.cpp [llvm-pdbdump] Abstract some of the YAML/Raw printing code. 2017-04-29 01:13:21 +00:00
MCContext.cpp
MCDwarf.cpp Distinguish between code pointer size and DataLayout::getPointerSize() in DWARF info generation 2017-04-17 17:41:25 +00:00
MCELFObjectTargetWriter.cpp
MCELFStreamer.cpp Reland r298901 with modifications (reverted in r298932) 2017-04-03 21:50:04 +00:00
MCExpr.cpp
MCFragment.cpp
MCInst.cpp
MCInstPrinter.cpp
MCInstrAnalysis.cpp
MCInstrDesc.cpp
MCLabel.cpp
MCLinkerOptimizationHint.cpp
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp
MCNullStreamer.cpp
MCObjectFileInfo.cpp [bpf] add relocation support 2017-05-03 17:30:56 +00:00
MCObjectStreamer.cpp This patch closes PR#32216: Better testing of schedule model instruction latencies/throughputs. 2017-04-14 07:44:23 +00:00
MCObjectWriter.cpp MC: Remove unused virtual function MCObjectWriter::isWeak. NFC. 2017-04-08 23:35:49 +00:00
MCRegisterInfo.cpp
MCSchedule.cpp
MCSection.cpp
MCSectionCOFF.cpp
MCSectionELF.cpp Change section flag character for SHF_LINK_ORDER to "o". 2017-04-04 22:35:08 +00:00
MCSectionMachO.cpp
MCSectionWasm.cpp
MCStreamer.cpp This patch closes PR#32216: Better testing of schedule model instruction latencies/throughputs. 2017-04-14 07:44:23 +00:00
MCSubtargetInfo.cpp
MCSymbol.cpp
MCSymbolELF.cpp
MCTargetOptions.cpp
MCValue.cpp
MCWasmObjectTargetWriter.cpp
MCWasmStreamer.cpp
MCWin64EH.cpp
MCWinEH.cpp
StringTableBuilder.cpp [MC] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). 2017-04-26 22:31:39 +00:00
SubtargetFeature.cpp
WasmObjectWriter.cpp [WebAssembly] Add size of section header to data relocation offsets. 2017-04-28 21:22:38 +00:00
WinCOFFObjectWriter.cpp [MC] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). 2017-04-26 22:31:39 +00:00
WinCOFFStreamer.cpp