mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Temporary revert my last commit: it seems it's triggering some subtle bug in backend
and breaks llvm-gcc git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58926 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b5b9252a17
commit
0b45c9957f
@ -362,9 +362,6 @@ namespace llvm {
|
||||
/// this is suported by the target.
|
||||
void printVisibility(const std::string& Name, unsigned Visibility) const;
|
||||
|
||||
/// printOffset - This is just convenient handler for printing offsets.
|
||||
void printOffset(int64_t Offset) const;
|
||||
|
||||
private:
|
||||
const GlobalValue *findGlobalValue(const Constant* CV);
|
||||
void EmitLLVMUsedList(Constant *List);
|
||||
|
@ -1520,13 +1520,6 @@ void AsmPrinter::printVisibility(const std::string& Name,
|
||||
}
|
||||
}
|
||||
|
||||
void AsmPrinter::printOffset(int64_t Offset) const {
|
||||
if (Offset > 0)
|
||||
O << '+' << Offset;
|
||||
else if (Offset < 0)
|
||||
O << Offset;
|
||||
}
|
||||
|
||||
GCMetadataPrinter *AsmPrinter::GetOrCreateGCPrinter(GCStrategy *S) {
|
||||
if (!S->usesMetadata())
|
||||
return 0;
|
||||
|
@ -300,9 +300,12 @@ void ARMAsmPrinter::printOperand(const MachineInstr *MI, int opNum,
|
||||
FnStubs.insert(Name);
|
||||
} else
|
||||
O << Name;
|
||||
|
||||
printOffset(MO.getOffset());
|
||||
|
||||
|
||||
if (MO.getOffset() > 0)
|
||||
O << '+' << MO.getOffset();
|
||||
else if (MO.getOffset() < 0)
|
||||
O << MO.getOffset();
|
||||
|
||||
if (isCallOp && Subtarget->isTargetELF() &&
|
||||
TM.getRelocationModel() == Reloc::PIC_)
|
||||
O << "(PLT)";
|
||||
@ -342,7 +345,7 @@ static void printSOImm(raw_ostream &O, int64_t V, const TargetAsmInfo *TAI) {
|
||||
assert(V < (1 << 12) && "Not a valid so_imm value!");
|
||||
unsigned Imm = ARM_AM::getSOImmValImm(V);
|
||||
unsigned Rot = ARM_AM::getSOImmValRot(V);
|
||||
|
||||
|
||||
// Print low-level immediate formation info, per
|
||||
// A5.1.3: "Data-processing operands - Immediate".
|
||||
if (Rot) {
|
||||
|
@ -398,7 +398,10 @@ void PPCAsmPrinter::printOp(const MachineOperand &MO) {
|
||||
}
|
||||
O << Name;
|
||||
|
||||
printOffset(MO.getOffset());
|
||||
if (MO.getOffset() > 0)
|
||||
O << "+" << MO.getOffset();
|
||||
else if (MO.getOffset() < 0)
|
||||
O << MO.getOffset();
|
||||
|
||||
if (GV->hasExternalWeakLinkage())
|
||||
ExtWeakSymbols.insert(GV);
|
||||
|
@ -344,7 +344,11 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
|
||||
O << "@GOTOFF";
|
||||
}
|
||||
|
||||
printOffset(MO.getOffset());
|
||||
int Offset = MO.getOffset();
|
||||
if (Offset > 0)
|
||||
O << '+' << Offset;
|
||||
else if (Offset < 0)
|
||||
O << Offset;
|
||||
|
||||
if (isMemOp && Subtarget->isPICStyleRIPRel() && !NotRIPRel)
|
||||
O << "(%rip)";
|
||||
@ -425,7 +429,11 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
|
||||
if (GV->hasExternalWeakLinkage())
|
||||
ExtWeakSymbols.insert(GV);
|
||||
|
||||
printOffset(MO.getOffset());
|
||||
int Offset = MO.getOffset();
|
||||
if (Offset > 0)
|
||||
O << '+' << Offset;
|
||||
else if (Offset < 0)
|
||||
O << Offset;
|
||||
|
||||
if (isThreadLocal) {
|
||||
if (TM.getRelocationModel() == Reloc::PIC_ || Subtarget->is64Bit())
|
||||
|
@ -235,7 +235,11 @@ void X86IntelAsmPrinter::printOp(const MachineOperand &MO,
|
||||
if (!isMemOp) O << "OFFSET ";
|
||||
O << "[" << TAI->getPrivateGlobalPrefix() << "CPI"
|
||||
<< getFunctionNumber() << "_" << MO.getIndex();
|
||||
printOffset(MO.getOffset());
|
||||
int Offset = MO.getOffset();
|
||||
if (Offset > 0)
|
||||
O << " + " << Offset;
|
||||
else if (Offset < 0)
|
||||
O << Offset;
|
||||
O << "]";
|
||||
return;
|
||||
}
|
||||
@ -254,7 +258,11 @@ void X86IntelAsmPrinter::printOp(const MachineOperand &MO,
|
||||
O << "__imp_";
|
||||
}
|
||||
O << Name;
|
||||
printOffset(MO.getOffset());
|
||||
int Offset = MO.getOffset();
|
||||
if (Offset > 0)
|
||||
O << " + " << Offset;
|
||||
else if (Offset < 0)
|
||||
O << Offset;
|
||||
return;
|
||||
}
|
||||
case MachineOperand::MO_ExternalSymbol: {
|
||||
|
Loading…
Reference in New Issue
Block a user