mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-30 04:56:49 +00:00
Separate MCInstPrinter registration from AsmPrinter registration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135974 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fd47a59661
commit
4b64e8a9e1
@ -38,7 +38,6 @@ LLVMDisasmContextRef LLVMCreateDisasm(const char *TripleName, void *DisInfo,
|
|||||||
// Initialize targets and assembly printers/parsers.
|
// Initialize targets and assembly printers/parsers.
|
||||||
llvm::InitializeAllTargetInfos();
|
llvm::InitializeAllTargetInfos();
|
||||||
llvm::InitializeAllTargetMCs();
|
llvm::InitializeAllTargetMCs();
|
||||||
llvm::InitializeAllAsmPrinters();
|
|
||||||
llvm::InitializeAllAsmParsers();
|
llvm::InitializeAllAsmParsers();
|
||||||
llvm::InitializeAllDisassemblers();
|
llvm::InitializeAllDisassemblers();
|
||||||
|
|
||||||
|
@ -106,7 +106,6 @@ void EDDisassembler::initialize() {
|
|||||||
|
|
||||||
InitializeAllTargetInfos();
|
InitializeAllTargetInfos();
|
||||||
InitializeAllTargetMCs();
|
InitializeAllTargetMCs();
|
||||||
InitializeAllAsmPrinters();
|
|
||||||
InitializeAllAsmParsers();
|
InitializeAllAsmParsers();
|
||||||
InitializeAllDisassemblers();
|
InitializeAllDisassemblers();
|
||||||
}
|
}
|
||||||
|
@ -1815,20 +1815,9 @@ void ARMAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
|||||||
// Target Registry Stuff
|
// Target Registry Stuff
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
static MCInstPrinter *createARMMCInstPrinter(const Target &T,
|
|
||||||
unsigned SyntaxVariant,
|
|
||||||
const MCAsmInfo &MAI) {
|
|
||||||
if (SyntaxVariant == 0)
|
|
||||||
return new ARMInstPrinter(MAI);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Force static initialization.
|
// Force static initialization.
|
||||||
extern "C" void LLVMInitializeARMAsmPrinter() {
|
extern "C" void LLVMInitializeARMAsmPrinter() {
|
||||||
RegisterAsmPrinter<ARMAsmPrinter> X(TheARMTarget);
|
RegisterAsmPrinter<ARMAsmPrinter> X(TheARMTarget);
|
||||||
RegisterAsmPrinter<ARMAsmPrinter> Y(TheThumbTarget);
|
RegisterAsmPrinter<ARMAsmPrinter> Y(TheThumbTarget);
|
||||||
|
|
||||||
TargetRegistry::RegisterMCInstPrinter(TheARMTarget, createARMMCInstPrinter);
|
|
||||||
TargetRegistry::RegisterMCInstPrinter(TheThumbTarget, createARMMCInstPrinter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include "ARMMCTargetDesc.h"
|
#include "ARMMCTargetDesc.h"
|
||||||
#include "ARMMCAsmInfo.h"
|
#include "ARMMCAsmInfo.h"
|
||||||
|
#include "InstPrinter/ARMInstPrinter.h"
|
||||||
#include "llvm/MC/MCInstrInfo.h"
|
#include "llvm/MC/MCInstrInfo.h"
|
||||||
#include "llvm/MC/MCRegisterInfo.h"
|
#include "llvm/MC/MCRegisterInfo.h"
|
||||||
#include "llvm/MC/MCStreamer.h"
|
#include "llvm/MC/MCStreamer.h"
|
||||||
@ -150,6 +151,14 @@ static MCStreamer *createMCStreamer(const Target &T, const std::string &TT,
|
|||||||
return createELFStreamer(Ctx, TAB, OS, Emitter, RelaxAll, NoExecStack);
|
return createELFStreamer(Ctx, TAB, OS, Emitter, RelaxAll, NoExecStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static MCInstPrinter *createARMMCInstPrinter(const Target &T,
|
||||||
|
unsigned SyntaxVariant,
|
||||||
|
const MCAsmInfo &MAI) {
|
||||||
|
if (SyntaxVariant == 0)
|
||||||
|
return new ARMInstPrinter(MAI);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Force static initialization.
|
// Force static initialization.
|
||||||
extern "C" void LLVMInitializeARMTargetMC() {
|
extern "C" void LLVMInitializeARMTargetMC() {
|
||||||
@ -186,4 +195,8 @@ extern "C" void LLVMInitializeARMTargetMC() {
|
|||||||
// Register the object streamer.
|
// Register the object streamer.
|
||||||
TargetRegistry::RegisterObjectStreamer(TheARMTarget, createMCStreamer);
|
TargetRegistry::RegisterObjectStreamer(TheARMTarget, createMCStreamer);
|
||||||
TargetRegistry::RegisterObjectStreamer(TheThumbTarget, createMCStreamer);
|
TargetRegistry::RegisterObjectStreamer(TheThumbTarget, createMCStreamer);
|
||||||
|
|
||||||
|
// Register the MCInstPrinter.
|
||||||
|
TargetRegistry::RegisterMCInstPrinter(TheARMTarget, createARMMCInstPrinter);
|
||||||
|
TargetRegistry::RegisterMCInstPrinter(TheThumbTarget, createARMMCInstPrinter);
|
||||||
}
|
}
|
||||||
|
@ -316,18 +316,7 @@ isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const {
|
|||||||
return I == Pred->end() || !I->getDesc().isBarrier();
|
return I == Pred->end() || !I->getDesc().isBarrier();
|
||||||
}
|
}
|
||||||
|
|
||||||
static MCInstPrinter *createMBlazeMCInstPrinter(const Target &T,
|
|
||||||
unsigned SyntaxVariant,
|
|
||||||
const MCAsmInfo &MAI) {
|
|
||||||
if (SyntaxVariant == 0)
|
|
||||||
return new MBlazeInstPrinter(MAI);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Force static initialization.
|
// Force static initialization.
|
||||||
extern "C" void LLVMInitializeMBlazeAsmPrinter() {
|
extern "C" void LLVMInitializeMBlazeAsmPrinter() {
|
||||||
RegisterAsmPrinter<MBlazeAsmPrinter> X(TheMBlazeTarget);
|
RegisterAsmPrinter<MBlazeAsmPrinter> X(TheMBlazeTarget);
|
||||||
TargetRegistry::RegisterMCInstPrinter(TheMBlazeTarget,
|
|
||||||
createMBlazeMCInstPrinter);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include "MBlazeMCTargetDesc.h"
|
#include "MBlazeMCTargetDesc.h"
|
||||||
#include "MBlazeMCAsmInfo.h"
|
#include "MBlazeMCAsmInfo.h"
|
||||||
|
#include "InstPrinter/MBlazeInstPrinter.h"
|
||||||
#include "llvm/MC/MCInstrInfo.h"
|
#include "llvm/MC/MCInstrInfo.h"
|
||||||
#include "llvm/MC/MCRegisterInfo.h"
|
#include "llvm/MC/MCRegisterInfo.h"
|
||||||
#include "llvm/MC/MCStreamer.h"
|
#include "llvm/MC/MCStreamer.h"
|
||||||
@ -91,6 +92,14 @@ static MCStreamer *createMCStreamer(const Target &T, const std::string &TT,
|
|||||||
return createELFStreamer(Ctx, TAB, _OS, _Emitter, RelaxAll, NoExecStack);
|
return createELFStreamer(Ctx, TAB, _OS, _Emitter, RelaxAll, NoExecStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static MCInstPrinter *createMBlazeMCInstPrinter(const Target &T,
|
||||||
|
unsigned SyntaxVariant,
|
||||||
|
const MCAsmInfo &MAI) {
|
||||||
|
if (SyntaxVariant == 0)
|
||||||
|
return new MBlazeInstPrinter(MAI);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Force static initialization.
|
// Force static initialization.
|
||||||
extern "C" void LLVMInitializeMBlazeTargetMC() {
|
extern "C" void LLVMInitializeMBlazeTargetMC() {
|
||||||
// Register the MC asm info.
|
// Register the MC asm info.
|
||||||
@ -122,4 +131,8 @@ extern "C" void LLVMInitializeMBlazeTargetMC() {
|
|||||||
// Register the object streamer
|
// Register the object streamer
|
||||||
TargetRegistry::RegisterObjectStreamer(TheMBlazeTarget,
|
TargetRegistry::RegisterObjectStreamer(TheMBlazeTarget,
|
||||||
createMCStreamer);
|
createMCStreamer);
|
||||||
|
|
||||||
|
// Register the MCInstPrinter.
|
||||||
|
TargetRegistry::RegisterMCInstPrinter(TheMBlazeTarget,
|
||||||
|
createMBlazeMCInstPrinter);
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include "MSP430MCTargetDesc.h"
|
#include "MSP430MCTargetDesc.h"
|
||||||
#include "MSP430MCAsmInfo.h"
|
#include "MSP430MCAsmInfo.h"
|
||||||
|
#include "InstPrinter/MSP430InstPrinter.h"
|
||||||
#include "llvm/MC/MCInstrInfo.h"
|
#include "llvm/MC/MCInstrInfo.h"
|
||||||
#include "llvm/MC/MCRegisterInfo.h"
|
#include "llvm/MC/MCRegisterInfo.h"
|
||||||
#include "llvm/MC/MCSubtargetInfo.h"
|
#include "llvm/MC/MCSubtargetInfo.h"
|
||||||
@ -55,6 +56,14 @@ static MCCodeGenInfo *createMSP430MCCodeGenInfo(StringRef TT, Reloc::Model RM,
|
|||||||
return X;
|
return X;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static MCInstPrinter *createMSP430MCInstPrinter(const Target &T,
|
||||||
|
unsigned SyntaxVariant,
|
||||||
|
const MCAsmInfo &MAI) {
|
||||||
|
if (SyntaxVariant == 0)
|
||||||
|
return new MSP430InstPrinter(MAI);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" void LLVMInitializeMSP430TargetMC() {
|
extern "C" void LLVMInitializeMSP430TargetMC() {
|
||||||
// Register the MC asm info.
|
// Register the MC asm info.
|
||||||
RegisterMCAsmInfo<MSP430MCAsmInfo> X(TheMSP430Target);
|
RegisterMCAsmInfo<MSP430MCAsmInfo> X(TheMSP430Target);
|
||||||
@ -73,4 +82,8 @@ extern "C" void LLVMInitializeMSP430TargetMC() {
|
|||||||
// Register the MC subtarget info.
|
// Register the MC subtarget info.
|
||||||
TargetRegistry::RegisterMCSubtargetInfo(TheMSP430Target,
|
TargetRegistry::RegisterMCSubtargetInfo(TheMSP430Target,
|
||||||
createMSP430MCSubtargetInfo);
|
createMSP430MCSubtargetInfo);
|
||||||
|
|
||||||
|
// Register the MCInstPrinter.
|
||||||
|
TargetRegistry::RegisterMCInstPrinter(TheMSP430Target,
|
||||||
|
createMSP430MCInstPrinter);
|
||||||
}
|
}
|
||||||
|
@ -163,17 +163,7 @@ void MSP430AsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
|||||||
OutStreamer.EmitInstruction(TmpInst);
|
OutStreamer.EmitInstruction(TmpInst);
|
||||||
}
|
}
|
||||||
|
|
||||||
static MCInstPrinter *createMSP430MCInstPrinter(const Target &T,
|
|
||||||
unsigned SyntaxVariant,
|
|
||||||
const MCAsmInfo &MAI) {
|
|
||||||
if (SyntaxVariant == 0)
|
|
||||||
return new MSP430InstPrinter(MAI);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Force static initialization.
|
// Force static initialization.
|
||||||
extern "C" void LLVMInitializeMSP430AsmPrinter() {
|
extern "C" void LLVMInitializeMSP430AsmPrinter() {
|
||||||
RegisterAsmPrinter<MSP430AsmPrinter> X(TheMSP430Target);
|
RegisterAsmPrinter<MSP430AsmPrinter> X(TheMSP430Target);
|
||||||
TargetRegistry::RegisterMCInstPrinter(TheMSP430Target,
|
|
||||||
createMSP430MCInstPrinter);
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include "MipsMCTargetDesc.h"
|
#include "MipsMCTargetDesc.h"
|
||||||
#include "MipsMCAsmInfo.h"
|
#include "MipsMCAsmInfo.h"
|
||||||
|
#include "InstPrinter/MipsInstPrinter.h"
|
||||||
#include "llvm/MC/MachineLocation.h"
|
#include "llvm/MC/MachineLocation.h"
|
||||||
#include "llvm/MC/MCInstrInfo.h"
|
#include "llvm/MC/MCInstrInfo.h"
|
||||||
#include "llvm/MC/MCRegisterInfo.h"
|
#include "llvm/MC/MCRegisterInfo.h"
|
||||||
@ -74,6 +75,12 @@ static MCCodeGenInfo *createMipsMCCodeGenInfo(StringRef TT, Reloc::Model RM,
|
|||||||
return X;
|
return X;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static MCInstPrinter *createMipsMCInstPrinter(const Target &T,
|
||||||
|
unsigned SyntaxVariant,
|
||||||
|
const MCAsmInfo &MAI) {
|
||||||
|
return new MipsInstPrinter(MAI);
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" void LLVMInitializeMipsTargetMC() {
|
extern "C" void LLVMInitializeMipsTargetMC() {
|
||||||
// Register the MC asm info.
|
// Register the MC asm info.
|
||||||
RegisterMCAsmInfoFn X(TheMipsTarget, createMipsMCAsmInfo);
|
RegisterMCAsmInfoFn X(TheMipsTarget, createMipsMCAsmInfo);
|
||||||
@ -95,4 +102,10 @@ extern "C" void LLVMInitializeMipsTargetMC() {
|
|||||||
// Register the MC subtarget info.
|
// Register the MC subtarget info.
|
||||||
TargetRegistry::RegisterMCSubtargetInfo(TheMipsTarget,
|
TargetRegistry::RegisterMCSubtargetInfo(TheMipsTarget,
|
||||||
createMipsMCSubtargetInfo);
|
createMipsMCSubtargetInfo);
|
||||||
|
|
||||||
|
// Register the MCInstPrinter.
|
||||||
|
TargetRegistry::RegisterMCInstPrinter(TheMipsTarget,
|
||||||
|
createMipsMCInstPrinter);
|
||||||
|
TargetRegistry::RegisterMCInstPrinter(TheMipselTarget,
|
||||||
|
createMipsMCInstPrinter);
|
||||||
}
|
}
|
||||||
|
@ -424,17 +424,7 @@ void MipsAsmPrinter::PrintDebugValueComment(const MachineInstr *MI,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Force static initialization.
|
// Force static initialization.
|
||||||
static MCInstPrinter *createMipsMCInstPrinter(const Target &T,
|
|
||||||
unsigned SyntaxVariant,
|
|
||||||
const MCAsmInfo &MAI) {
|
|
||||||
return new MipsInstPrinter(MAI);
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" void LLVMInitializeMipsAsmPrinter() {
|
extern "C" void LLVMInitializeMipsAsmPrinter() {
|
||||||
RegisterAsmPrinter<MipsAsmPrinter> X(TheMipsTarget);
|
RegisterAsmPrinter<MipsAsmPrinter> X(TheMipsTarget);
|
||||||
RegisterAsmPrinter<MipsAsmPrinter> Y(TheMipselTarget);
|
RegisterAsmPrinter<MipsAsmPrinter> Y(TheMipselTarget);
|
||||||
|
|
||||||
TargetRegistry::RegisterMCInstPrinter(TheMipsTarget, createMipsMCInstPrinter);
|
|
||||||
TargetRegistry::RegisterMCInstPrinter(TheMipselTarget,
|
|
||||||
createMipsMCInstPrinter);
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include "PPCMCTargetDesc.h"
|
#include "PPCMCTargetDesc.h"
|
||||||
#include "PPCMCAsmInfo.h"
|
#include "PPCMCAsmInfo.h"
|
||||||
|
#include "InstPrinter/PPCInstPrinter.h"
|
||||||
#include "llvm/MC/MachineLocation.h"
|
#include "llvm/MC/MachineLocation.h"
|
||||||
#include "llvm/MC/MCInstrInfo.h"
|
#include "llvm/MC/MCInstrInfo.h"
|
||||||
#include "llvm/MC/MCRegisterInfo.h"
|
#include "llvm/MC/MCRegisterInfo.h"
|
||||||
@ -101,6 +102,12 @@ static MCStreamer *createMCStreamer(const Target &T, const std::string &TT,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static MCInstPrinter *createPPCMCInstPrinter(const Target &T,
|
||||||
|
unsigned SyntaxVariant,
|
||||||
|
const MCAsmInfo &MAI) {
|
||||||
|
return new PPCInstPrinter(MAI, SyntaxVariant);
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" void LLVMInitializePowerPCTargetMC() {
|
extern "C" void LLVMInitializePowerPCTargetMC() {
|
||||||
// Register the MC asm info.
|
// Register the MC asm info.
|
||||||
RegisterMCAsmInfoFn C(ThePPC32Target, createPPCMCAsmInfo);
|
RegisterMCAsmInfoFn C(ThePPC32Target, createPPCMCAsmInfo);
|
||||||
@ -135,4 +142,8 @@ extern "C" void LLVMInitializePowerPCTargetMC() {
|
|||||||
// Register the object streamer.
|
// Register the object streamer.
|
||||||
TargetRegistry::RegisterObjectStreamer(ThePPC32Target, createMCStreamer);
|
TargetRegistry::RegisterObjectStreamer(ThePPC32Target, createMCStreamer);
|
||||||
TargetRegistry::RegisterObjectStreamer(ThePPC64Target, createMCStreamer);
|
TargetRegistry::RegisterObjectStreamer(ThePPC64Target, createMCStreamer);
|
||||||
|
|
||||||
|
// Register the MCInstPrinter.
|
||||||
|
TargetRegistry::RegisterMCInstPrinter(ThePPC32Target, createPPCMCInstPrinter);
|
||||||
|
TargetRegistry::RegisterMCInstPrinter(ThePPC64Target, createPPCMCInstPrinter);
|
||||||
}
|
}
|
||||||
|
@ -679,18 +679,8 @@ static AsmPrinter *createPPCAsmPrinterPass(TargetMachine &tm,
|
|||||||
return new PPCLinuxAsmPrinter(tm, Streamer);
|
return new PPCLinuxAsmPrinter(tm, Streamer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static MCInstPrinter *createPPCMCInstPrinter(const Target &T,
|
|
||||||
unsigned SyntaxVariant,
|
|
||||||
const MCAsmInfo &MAI) {
|
|
||||||
return new PPCInstPrinter(MAI, SyntaxVariant);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Force static initialization.
|
// Force static initialization.
|
||||||
extern "C" void LLVMInitializePowerPCAsmPrinter() {
|
extern "C" void LLVMInitializePowerPCAsmPrinter() {
|
||||||
TargetRegistry::RegisterAsmPrinter(ThePPC32Target, createPPCAsmPrinterPass);
|
TargetRegistry::RegisterAsmPrinter(ThePPC32Target, createPPCAsmPrinterPass);
|
||||||
TargetRegistry::RegisterAsmPrinter(ThePPC64Target, createPPCAsmPrinterPass);
|
TargetRegistry::RegisterAsmPrinter(ThePPC64Target, createPPCAsmPrinterPass);
|
||||||
|
|
||||||
TargetRegistry::RegisterMCInstPrinter(ThePPC32Target, createPPCMCInstPrinter);
|
|
||||||
TargetRegistry::RegisterMCInstPrinter(ThePPC64Target, createPPCMCInstPrinter);
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
#include "X86MCTargetDesc.h"
|
#include "X86MCTargetDesc.h"
|
||||||
#include "X86MCAsmInfo.h"
|
#include "X86MCAsmInfo.h"
|
||||||
|
#include "InstPrinter/X86ATTInstPrinter.h"
|
||||||
|
#include "InstPrinter/X86IntelInstPrinter.h"
|
||||||
#include "llvm/MC/MachineLocation.h"
|
#include "llvm/MC/MachineLocation.h"
|
||||||
#include "llvm/MC/MCInstrInfo.h"
|
#include "llvm/MC/MCInstrInfo.h"
|
||||||
#include "llvm/MC/MCRegisterInfo.h"
|
#include "llvm/MC/MCRegisterInfo.h"
|
||||||
@ -381,6 +383,16 @@ static MCStreamer *createMCStreamer(const Target &T, const std::string &TT,
|
|||||||
return createELFStreamer(Ctx, TAB, _OS, _Emitter, RelaxAll, NoExecStack);
|
return createELFStreamer(Ctx, TAB, _OS, _Emitter, RelaxAll, NoExecStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static MCInstPrinter *createX86MCInstPrinter(const Target &T,
|
||||||
|
unsigned SyntaxVariant,
|
||||||
|
const MCAsmInfo &MAI) {
|
||||||
|
if (SyntaxVariant == 0)
|
||||||
|
return new X86ATTInstPrinter(MAI);
|
||||||
|
if (SyntaxVariant == 1)
|
||||||
|
return new X86IntelInstPrinter(MAI);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Force static initialization.
|
// Force static initialization.
|
||||||
extern "C" void LLVMInitializeX86TargetMC() {
|
extern "C" void LLVMInitializeX86TargetMC() {
|
||||||
// Register the MC asm info.
|
// Register the MC asm info.
|
||||||
@ -422,4 +434,10 @@ extern "C" void LLVMInitializeX86TargetMC() {
|
|||||||
createMCStreamer);
|
createMCStreamer);
|
||||||
TargetRegistry::RegisterObjectStreamer(TheX86_64Target,
|
TargetRegistry::RegisterObjectStreamer(TheX86_64Target,
|
||||||
createMCStreamer);
|
createMCStreamer);
|
||||||
|
|
||||||
|
// Register the MCInstPrinter.
|
||||||
|
TargetRegistry::RegisterMCInstPrinter(TheX86_32Target,
|
||||||
|
createX86MCInstPrinter);
|
||||||
|
TargetRegistry::RegisterMCInstPrinter(TheX86_64Target,
|
||||||
|
createX86MCInstPrinter);
|
||||||
}
|
}
|
||||||
|
@ -708,21 +708,8 @@ void X86AsmPrinter::PrintDebugValueComment(const MachineInstr *MI,
|
|||||||
// Target Registry Stuff
|
// Target Registry Stuff
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
static MCInstPrinter *createX86MCInstPrinter(const Target &T,
|
|
||||||
unsigned SyntaxVariant,
|
|
||||||
const MCAsmInfo &MAI) {
|
|
||||||
if (SyntaxVariant == 0)
|
|
||||||
return new X86ATTInstPrinter(MAI);
|
|
||||||
if (SyntaxVariant == 1)
|
|
||||||
return new X86IntelInstPrinter(MAI);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Force static initialization.
|
// Force static initialization.
|
||||||
extern "C" void LLVMInitializeX86AsmPrinter() {
|
extern "C" void LLVMInitializeX86AsmPrinter() {
|
||||||
RegisterAsmPrinter<X86AsmPrinter> X(TheX86_32Target);
|
RegisterAsmPrinter<X86AsmPrinter> X(TheX86_32Target);
|
||||||
RegisterAsmPrinter<X86AsmPrinter> Y(TheX86_64Target);
|
RegisterAsmPrinter<X86AsmPrinter> Y(TheX86_64Target);
|
||||||
|
|
||||||
TargetRegistry::RegisterMCInstPrinter(TheX86_32Target,createX86MCInstPrinter);
|
|
||||||
TargetRegistry::RegisterMCInstPrinter(TheX86_64Target,createX86MCInstPrinter);
|
|
||||||
}
|
}
|
||||||
|
@ -452,14 +452,9 @@ int main(int argc, char **argv) {
|
|||||||
// Initialize targets and assembly printers/parsers.
|
// Initialize targets and assembly printers/parsers.
|
||||||
llvm::InitializeAllTargetInfos();
|
llvm::InitializeAllTargetInfos();
|
||||||
llvm::InitializeAllTargetMCs();
|
llvm::InitializeAllTargetMCs();
|
||||||
llvm::InitializeAllAsmPrinters();
|
|
||||||
llvm::InitializeAllAsmParsers();
|
llvm::InitializeAllAsmParsers();
|
||||||
llvm::InitializeAllDisassemblers();
|
llvm::InitializeAllDisassemblers();
|
||||||
|
|
||||||
// Register the target printer for --version.
|
|
||||||
// FIXME: Remove when we stop initializing the Target(Machine)s above.
|
|
||||||
cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion);
|
|
||||||
|
|
||||||
cl::ParseCommandLineOptions(argc, argv, "llvm machine code playground\n");
|
cl::ParseCommandLineOptions(argc, argv, "llvm machine code playground\n");
|
||||||
TripleName = Triple::normalize(TripleName);
|
TripleName = Triple::normalize(TripleName);
|
||||||
|
|
||||||
|
@ -309,14 +309,9 @@ int main(int argc, char **argv) {
|
|||||||
// Initialize targets and assembly printers/parsers.
|
// Initialize targets and assembly printers/parsers.
|
||||||
llvm::InitializeAllTargetInfos();
|
llvm::InitializeAllTargetInfos();
|
||||||
llvm::InitializeAllTargetMCs();
|
llvm::InitializeAllTargetMCs();
|
||||||
llvm::InitializeAllAsmPrinters();
|
|
||||||
llvm::InitializeAllAsmParsers();
|
llvm::InitializeAllAsmParsers();
|
||||||
llvm::InitializeAllDisassemblers();
|
llvm::InitializeAllDisassemblers();
|
||||||
|
|
||||||
// Register the target printer for --version.
|
|
||||||
// FIXME: Remove when we stop initializing the Target(Machine)s above.
|
|
||||||
cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion);
|
|
||||||
|
|
||||||
cl::ParseCommandLineOptions(argc, argv, "llvm object file dumper\n");
|
cl::ParseCommandLineOptions(argc, argv, "llvm object file dumper\n");
|
||||||
TripleName = Triple::normalize(TripleName);
|
TripleName = Triple::normalize(TripleName);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user