mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo down
to MCRegisterInfo. Also initialize the mapping at construction time. This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step towards fixing the layering violation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135424 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -40,6 +40,21 @@ extern "C" void LLVMInitializePowerPCMCInstrInfo() {
|
||||
TargetRegistry::RegisterMCInstrInfo(ThePPC64Target, createPPCMCInstrInfo);
|
||||
}
|
||||
|
||||
static MCRegisterInfo *createPPCMCRegisterInfo(StringRef TT) {
|
||||
Triple TheTriple(TT);
|
||||
bool isPPC64 = (TheTriple.getArch() == Triple::ppc64);
|
||||
unsigned Flavour = isPPC64 ? 0 : 1;
|
||||
unsigned RA = isPPC64 ? PPC::LR8 : PPC::LR;
|
||||
|
||||
MCRegisterInfo *X = new MCRegisterInfo();
|
||||
InitPPCMCRegisterInfo(X, RA, Flavour, Flavour);
|
||||
return X;
|
||||
}
|
||||
|
||||
extern "C" void LLVMInitializePowerPCMCRegisterInfo() {
|
||||
TargetRegistry::RegisterMCRegInfo(ThePPC32Target, createPPCMCRegisterInfo);
|
||||
TargetRegistry::RegisterMCRegInfo(ThePPC64Target, createPPCMCRegisterInfo);
|
||||
}
|
||||
|
||||
static MCSubtargetInfo *createPPCMCSubtargetInfo(StringRef TT, StringRef CPU,
|
||||
StringRef FS) {
|
||||
|
Reference in New Issue
Block a user