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 [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-08 22:23:19 +00:00
MCParser [LLVM][inline-asm][Altmacor] Altmacro string delimiter '<..>' 2017-05-04 10:37:00 +00:00
CMakeLists.txt [WebAssembly] Add skeleton MC support for the Wasm container format 2017-02-22 01:23:18 +00:00
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 Nuke MCAnalysis. 2014-09-02 22:32:20 +00:00
MachObjectWriter.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-07 23:02:00 +00:00
MCAsmBackend.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-08 22:23:19 +00:00
MCAsmInfo.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCAsmInfoCOFF.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCAsmInfoDarwin.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCAsmInfoELF.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCAsmInfoWasm.cpp [WebAssembly] Add skeleton MC support for the Wasm container format 2017-02-22 01:23:18 +00:00
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 [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-08 22:23:19 +00:00
MCCodeView.cpp [llvm-pdbdump] Abstract some of the YAML/Raw printing code. 2017-04-29 01:13:21 +00:00
MCContext.cpp Fix asm printing of associated sections. 2017-03-14 19:28:51 +00:00
MCDwarf.cpp Distinguish between code pointer size and DataLayout::getPointerSize() in DWARF info generation 2017-04-17 17:41:25 +00:00
MCELFObjectTargetWriter.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-07 23:02:00 +00:00
MCELFStreamer.cpp Reland r298901 with modifications (reverted in r298932) 2017-04-03 21:50:04 +00:00
MCExpr.cpp [Assembler] Add location info to unary expressions. 2017-03-10 13:08:20 +00:00
MCFragment.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-07 23:02:00 +00:00
MCInst.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCInstPrinter.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCInstrAnalysis.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCInstrDesc.cpp Replace uint16_t with the MCPhysReg typedef in many places. A lot of physical register arrays already use this typedef. 2015-12-05 07:13:35 +00:00
MCLabel.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-08 22:23:19 +00:00
MCLinkerOptimizationHint.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCMachObjectTargetWriter.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-11 00:27:28 +00:00
MCMachOStreamer.cpp Simplify/make more explicit (by making less explicit in some ways) some function calls 2017-03-16 00:43:19 +00:00
MCNullStreamer.cpp [MC] Implement the COFF directives in MCNullStreamer. 2017-02-27 23:10:18 +00:00
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 [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-10 01:33:54 +00:00
MCSchedule.cpp Add <type_traits> for is_pod, fixing r241947 2015-07-10 22:17:49 +00:00
MCSection.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-08 22:23:19 +00:00
MCSectionCOFF.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-10 01:33:54 +00:00
MCSectionELF.cpp Change section flag character for SHF_LINK_ORDER to "o". 2017-04-04 22:35:08 +00:00
MCSectionMachO.cpp Fix the GCC build. 2017-01-30 19:05:09 +00:00
MCSectionWasm.cpp [WebAssembly] Add skeleton MC support for the Wasm container format 2017-02-22 01:23:18 +00:00
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 [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-08 22:23:19 +00:00
MCSymbol.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-08 22:23:19 +00:00
MCSymbolELF.cpp Change how we handle section symbols on ELF. 2017-02-02 21:26:06 +00:00
MCTargetOptions.cpp [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-10 01:33:54 +00:00
MCValue.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
MCWasmObjectTargetWriter.cpp [WebAssembly] Add skeleton MC support for the Wasm container format 2017-02-22 01:23:18 +00:00
MCWasmStreamer.cpp MC: De-duplicate the object streamer implementations of EmitFileDirective into MCObjectStreamer. NFCI. 2017-03-03 21:22:06 +00:00
MCWin64EH.cpp [MC] Create unique .pdata sections for every .text section 2016-05-02 23:22:18 +00:00
MCWinEH.cpp Revert r283690, "MC: Remove unused entities." 2016-10-10 22:49:37 +00:00
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 SubtargetFeature: Cleanup; NFC 2017-02-21 01:27:29 +00:00
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 MC: De-duplicate the object streamer implementations of EmitFileDirective into MCObjectStreamer. NFCI. 2017-03-03 21:22:06 +00:00