mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Follow up of the introduction of MCSymbolizer.
- Ressurect old MCDisassemble API to soften transition. - Extend MCTargetDesc to set target specific symbolizer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182688 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -212,12 +212,13 @@ static MCInstPrinter *createARMMCInstPrinter(const Target &T,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static MCRelocationInfo *createMCRelocationInfo(StringRef TT, MCContext &Ctx) {
|
||||
static MCRelocationInfo *createARMMCRelocationInfo(StringRef TT,
|
||||
MCContext &Ctx) {
|
||||
Triple TheTriple(TT);
|
||||
if (TheTriple.isEnvironmentMachO())
|
||||
return createARMMachORelocationInfo(Ctx);
|
||||
// Default to the stock relocation info.
|
||||
return llvm::createMCRelocationInfo(Ctx);
|
||||
return llvm::createMCRelocationInfo(TT, Ctx);
|
||||
}
|
||||
|
||||
namespace {
|
||||
@@ -307,7 +308,7 @@ extern "C" void LLVMInitializeARMTargetMC() {
|
||||
|
||||
// Register the MC relocation info.
|
||||
TargetRegistry::RegisterMCRelocationInfo(TheARMTarget,
|
||||
createMCRelocationInfo);
|
||||
createARMMCRelocationInfo);
|
||||
TargetRegistry::RegisterMCRelocationInfo(TheThumbTarget,
|
||||
createMCRelocationInfo);
|
||||
createARMMCRelocationInfo);
|
||||
}
|
||||
|
@@ -384,14 +384,15 @@ static MCInstPrinter *createX86MCInstPrinter(const Target &T,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static MCRelocationInfo *createMCRelocationInfo(StringRef TT, MCContext &Ctx) {
|
||||
static MCRelocationInfo *createX86MCRelocationInfo(StringRef TT,
|
||||
MCContext &Ctx) {
|
||||
Triple TheTriple(TT);
|
||||
if (TheTriple.isEnvironmentMachO() && TheTriple.getArch() == Triple::x86_64)
|
||||
return createX86_64MachORelocationInfo(Ctx);
|
||||
else if (TheTriple.isOSBinFormatELF())
|
||||
return createX86_64ELFRelocationInfo(Ctx);
|
||||
// Default to the stock relocation info.
|
||||
return llvm::createMCRelocationInfo(Ctx);
|
||||
return llvm::createMCRelocationInfo(TT, Ctx);
|
||||
}
|
||||
|
||||
static MCInstrAnalysis *createX86MCInstrAnalysis(const MCInstrInfo *Info) {
|
||||
@@ -454,7 +455,7 @@ extern "C" void LLVMInitializeX86TargetMC() {
|
||||
|
||||
// Register the MC relocation info.
|
||||
TargetRegistry::RegisterMCRelocationInfo(TheX86_32Target,
|
||||
createMCRelocationInfo);
|
||||
createX86MCRelocationInfo);
|
||||
TargetRegistry::RegisterMCRelocationInfo(TheX86_64Target,
|
||||
createMCRelocationInfo);
|
||||
createX86MCRelocationInfo);
|
||||
}
|
||||
|
Reference in New Issue
Block a user