mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
515efbb17e
For RISCV branch instructions, we need to preserve relocation types when linker relaxation enabled, so then linker could modify offset when the branch offsets changed. We preserve relocation types by define shouldForceRelocation. IsResolved return by evaluateFixup will always false when shouldForceRelocation return true. It will make RISCV MC Branch Relaxation always relax 16-bit branches to 32-bit form, even if the symbol actually could be resolved. To avoid 16-bit branches always relax to 32-bit form when linker relaxation enabled, we add a new parameter WasForced to indicate that the symbol actually couldn't be resolved and not forced by shouldForceRelocation return true. RISCVAsmBackend::fixupNeedsRelaxationAdvanced could relax branches with unresolved symbols by (!IsResolved && !WasForced). RISCV MC Branch Relaxation is needed because RISCV could perform 32-bit to 16-bit transformation in MC layer. Differential Revision: https://reviews.llvm.org/D46350 llvm-svn: 332696 |
||
---|---|---|
.. | ||
MCDisassembler | ||
MCParser | ||
CMakeLists.txt | ||
ConstantPools.cpp | ||
ELFObjectWriter.cpp | ||
LLVMBuild.txt | ||
MachObjectWriter.cpp | ||
MCAsmBackend.cpp | ||
MCAsmInfo.cpp | ||
MCAsmInfoCOFF.cpp | ||
MCAsmInfoDarwin.cpp | ||
MCAsmInfoELF.cpp | ||
MCAsmInfoWasm.cpp | ||
MCAsmMacro.cpp | ||
MCAsmStreamer.cpp | ||
MCAssembler.cpp | ||
MCCodeEmitter.cpp | ||
MCCodePadder.cpp | ||
MCCodeView.cpp | ||
MCContext.cpp | ||
MCDwarf.cpp | ||
MCELFObjectTargetWriter.cpp | ||
MCELFStreamer.cpp | ||
MCExpr.cpp | ||
MCFragment.cpp | ||
MCInst.cpp | ||
MCInstPrinter.cpp | ||
MCInstrAnalysis.cpp | ||
MCInstrDesc.cpp | ||
MCLabel.cpp | ||
MCLinkerOptimizationHint.cpp | ||
MCMachObjectTargetWriter.cpp | ||
MCMachOStreamer.cpp | ||
MCNullStreamer.cpp | ||
MCObjectFileInfo.cpp | ||
MCObjectStreamer.cpp | ||
MCObjectWriter.cpp | ||
MCRegisterInfo.cpp | ||
MCSchedule.cpp | ||
MCSection.cpp | ||
MCSectionCOFF.cpp | ||
MCSectionELF.cpp | ||
MCSectionMachO.cpp | ||
MCSectionWasm.cpp | ||
MCStreamer.cpp | ||
MCSubtargetInfo.cpp | ||
MCSymbol.cpp | ||
MCSymbolELF.cpp | ||
MCTargetOptions.cpp | ||
MCValue.cpp | ||
MCWasmObjectTargetWriter.cpp | ||
MCWasmStreamer.cpp | ||
MCWin64EH.cpp | ||
MCWinCOFFStreamer.cpp | ||
MCWinEH.cpp | ||
StringTableBuilder.cpp | ||
SubtargetFeature.cpp | ||
WasmObjectWriter.cpp | ||
WinCOFFObjectWriter.cpp |