summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Stumpf <pascal@cvs.openbsd.org>2016-09-03 22:47:03 +0000
committerPascal Stumpf <pascal@cvs.openbsd.org>2016-09-03 22:47:03 +0000
commit6266cd372e8d0c21cd0499ad77c30affbd62cead (patch)
tree60633a716db11a444d0aed2f1534c2fcf363101b
parent2f32b75ca5e9b867df1fec51c7eb459a2ac52459 (diff)
Use the space freed up by sparc and zaurus to import LLVM.
ok hackroom@
-rw-r--r--gnu/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/gnu/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp b/gnu/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
index 19fb94534b2..e3b0f526674 100644
--- a/gnu/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
+++ b/gnu/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
@@ -12,12 +12,13 @@
//
//===----------------------------------------------------------------------===//
+#include "Sparc.h"
#include "InstPrinter/SparcInstPrinter.h"
#include "MCTargetDesc/SparcMCExpr.h"
-#include "Sparc.h"
#include "SparcInstrInfo.h"
#include "SparcTargetMachine.h"
#include "SparcTargetStreamer.h"
+#include "llvm/ADT/SmallString.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineModuleInfoImpls.h"
@@ -46,11 +47,14 @@ namespace {
std::unique_ptr<MCStreamer> Streamer)
: AsmPrinter(TM, std::move(Streamer)) {}
- StringRef getPassName() const override { return "Sparc Assembly Printer"; }
+ const char *getPassName() const override {
+ return "Sparc Assembly Printer";
+ }
void printOperand(const MachineInstr *MI, int opNum, raw_ostream &OS);
void printMemOperand(const MachineInstr *MI, int opNum, raw_ostream &OS,
const char *Modifier = nullptr);
+ void printCCOperand(const MachineInstr *MI, int opNum, raw_ostream &OS);
void EmitFunctionBodyStart() override;
void EmitInstruction(const MachineInstr *MI) override;
@@ -181,7 +185,7 @@ void SparcAsmPrinter::LowerGETPCXAndEmitMCInsts(const MachineInstr *MI,
MCOperand MCRegOP = MCOperand::createReg(MO.getReg());
- if (!isPositionIndependent()) {
+ if (TM.getRelocationModel() != Reloc::PIC_) {
// Just load the address of GOT to MCRegOP.
switch(TM.getCodeModel()) {
default:
@@ -372,9 +376,6 @@ void SparcAsmPrinter::printOperand(const MachineInstr *MI, int opNum,
O << DL.getPrivateGlobalPrefix() << "CPI" << getFunctionNumber() << "_"
<< MO.getIndex();
break;
- case MachineOperand::MO_Metadata:
- MO.getMetadata()->printAsOperand(O, MMI->getModule());
- break;
default:
llvm_unreachable("<unknown operand type>");
}
@@ -416,7 +417,6 @@ bool SparcAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
default:
// See if this is a generic print operand
return AsmPrinter::PrintAsmOperand(MI, OpNo, AsmVariant, ExtraCode, O);
- case 'f':
case 'r':
break;
}
@@ -443,7 +443,7 @@ bool SparcAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
// Force static initialization.
extern "C" void LLVMInitializeSparcAsmPrinter() {
- RegisterAsmPrinter<SparcAsmPrinter> X(getTheSparcTarget());
- RegisterAsmPrinter<SparcAsmPrinter> Y(getTheSparcV9Target());
- RegisterAsmPrinter<SparcAsmPrinter> Z(getTheSparcelTarget());
+ RegisterAsmPrinter<SparcAsmPrinter> X(TheSparcTarget);
+ RegisterAsmPrinter<SparcAsmPrinter> Y(TheSparcV9Target);
+ RegisterAsmPrinter<SparcAsmPrinter> Z(TheSparcelTarget);
}