mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-20 02:31:37 +00:00
Reduce nesting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120189 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f52788f4e6
commit
7976b88d9f
@ -1050,29 +1050,35 @@ public:
|
|||||||
const MCValue Target,
|
const MCValue Target,
|
||||||
bool IsPCRel,
|
bool IsPCRel,
|
||||||
const MCFragment *DF) const {
|
const MCFragment *DF) const {
|
||||||
// If we are using scattered symbols, determine whether this value is
|
// If we aren't using scattered symbols, the fixup is fully resolved.
|
||||||
// actually resolved; scattering may cause atoms to move.
|
if (!Asm.getBackend().hasScatteredSymbols())
|
||||||
if (Asm.getBackend().hasScatteredSymbols()) {
|
return true;
|
||||||
if (Asm.getBackend().hasReliableSymbolDifference()) {
|
|
||||||
// If this is a PCrel relocation, find the base atom (identified by its
|
|
||||||
// symbol) that the fixup value is relative to.
|
|
||||||
const MCSymbolData *BaseSymbol = 0;
|
|
||||||
if (IsPCRel) {
|
|
||||||
BaseSymbol = DF->getAtom();
|
|
||||||
if (!BaseSymbol)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return isScatteredFixupFullyResolved(Asm, Target, BaseSymbol);
|
// Otherwise, determine whether this value is actually resolved; scattering
|
||||||
} else {
|
// may cause atoms to move.
|
||||||
const MCSection *BaseSection = 0;
|
|
||||||
if (IsPCRel)
|
|
||||||
BaseSection = &DF->getParent()->getSection();
|
|
||||||
|
|
||||||
return isScatteredFixupFullyResolvedSimple(Asm, Target, BaseSection);
|
// Check if we are using the "simple" resolution algorithm (e.g.,
|
||||||
}
|
// i386).
|
||||||
|
if (!Asm.getBackend().hasReliableSymbolDifference()) {
|
||||||
|
const MCSection *BaseSection = 0;
|
||||||
|
if (IsPCRel)
|
||||||
|
BaseSection = &DF->getParent()->getSection();
|
||||||
|
|
||||||
|
return isScatteredFixupFullyResolvedSimple(Asm, Target, BaseSection);
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
|
// Otherwise, compute the proper answer as reliably as possible.
|
||||||
|
|
||||||
|
// If this is a PCrel relocation, find the base atom (identified by its
|
||||||
|
// symbol) that the fixup value is relative to.
|
||||||
|
const MCSymbolData *BaseSymbol = 0;
|
||||||
|
if (IsPCRel) {
|
||||||
|
BaseSymbol = DF->getAtom();
|
||||||
|
if (!BaseSymbol)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return isScatteredFixupFullyResolved(Asm, Target, BaseSymbol);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout) {
|
void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user