mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-06 14:57:41 +00:00
Get rid of virtual inheritance for PPC TAI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56586 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8490322fa9
commit
93ed1029ec
@ -19,21 +19,8 @@
|
|||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
using namespace llvm::dwarf;
|
using namespace llvm::dwarf;
|
||||||
|
|
||||||
PPCTargetAsmInfo::PPCTargetAsmInfo(const PPCTargetMachine &TM) {
|
|
||||||
bool isPPC64 = TM.getSubtargetImpl()->isPPC64();
|
|
||||||
|
|
||||||
ZeroDirective = "\t.space\t";
|
|
||||||
SetDirective = "\t.set";
|
|
||||||
Data64bitsDirective = isPPC64 ? "\t.quad\t" : 0;
|
|
||||||
AlignmentIsInBytes = false;
|
|
||||||
LCOMMDirective = "\t.lcomm\t";
|
|
||||||
InlineAsmStart = "# InlineAsm Start";
|
|
||||||
InlineAsmEnd = "# InlineAsm End";
|
|
||||||
AssemblerDialect = TM.getSubtargetImpl()->getAsmFlavor();
|
|
||||||
}
|
|
||||||
|
|
||||||
PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM):
|
PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM):
|
||||||
PPCTargetAsmInfo(TM), DarwinTargetAsmInfo(TM) {
|
PPCTargetAsmInfo<DarwinTargetAsmInfo>(TM) {
|
||||||
PCSymbol = ".";
|
PCSymbol = ".";
|
||||||
CommentString = ";";
|
CommentString = ";";
|
||||||
GlobalPrefix = "_";
|
GlobalPrefix = "_";
|
||||||
@ -103,7 +90,7 @@ PPCDarwinTargetAsmInfo::PreferredEHDataFormat(DwarfEncoding::Target Reason,
|
|||||||
|
|
||||||
|
|
||||||
PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) :
|
PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) :
|
||||||
PPCTargetAsmInfo(TM), ELFTargetAsmInfo(TM) {
|
PPCTargetAsmInfo<ELFTargetAsmInfo>(TM) {
|
||||||
CommentString = "#";
|
CommentString = "#";
|
||||||
GlobalPrefix = "";
|
GlobalPrefix = "";
|
||||||
PrivateGlobalPrefix = "";
|
PrivateGlobalPrefix = "";
|
||||||
|
@ -14,28 +14,40 @@
|
|||||||
#ifndef PPCTARGETASMINFO_H
|
#ifndef PPCTARGETASMINFO_H
|
||||||
#define PPCTARGETASMINFO_H
|
#define PPCTARGETASMINFO_H
|
||||||
|
|
||||||
|
#include "PPCTargetMachine.h"
|
||||||
#include "llvm/Target/TargetAsmInfo.h"
|
#include "llvm/Target/TargetAsmInfo.h"
|
||||||
#include "llvm/Target/DarwinTargetAsmInfo.h"
|
#include "llvm/Target/DarwinTargetAsmInfo.h"
|
||||||
#include "llvm/Target/ELFTargetAsmInfo.h"
|
#include "llvm/Target/ELFTargetAsmInfo.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
// Forward declaration.
|
template <class BaseTAI>
|
||||||
class PPCTargetMachine;
|
struct PPCTargetAsmInfo : public BaseTAI {
|
||||||
|
explicit PPCTargetAsmInfo(const PPCTargetMachine &TM):
|
||||||
|
BaseTAI(TM) {
|
||||||
|
const PPCSubtarget *Subtarget = &TM.getSubtarget<PPCSubtarget>();
|
||||||
|
bool isPPC64 = Subtarget->isPPC64();
|
||||||
|
|
||||||
struct PPCTargetAsmInfo : public virtual TargetAsmInfo {
|
BaseTAI::ZeroDirective = "\t.space\t";
|
||||||
explicit PPCTargetAsmInfo(const PPCTargetMachine &TM);
|
BaseTAI::SetDirective = "\t.set";
|
||||||
|
BaseTAI::Data64bitsDirective = isPPC64 ? "\t.quad\t" : 0;
|
||||||
|
BaseTAI::AlignmentIsInBytes = false;
|
||||||
|
BaseTAI::LCOMMDirective = "\t.lcomm\t";
|
||||||
|
BaseTAI::InlineAsmStart = "# InlineAsm Start";
|
||||||
|
BaseTAI::InlineAsmEnd = "# InlineAsm End";
|
||||||
|
BaseTAI::AssemblerDialect = Subtarget->getAsmFlavor();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PPCDarwinTargetAsmInfo : public PPCTargetAsmInfo,
|
typedef PPCTargetAsmInfo<TargetAsmInfo> PPCGenericTargetAsmInfo;
|
||||||
public DarwinTargetAsmInfo {
|
|
||||||
|
struct PPCDarwinTargetAsmInfo : public PPCTargetAsmInfo<DarwinTargetAsmInfo> {
|
||||||
explicit PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM);
|
explicit PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM);
|
||||||
virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
|
virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
|
||||||
bool Global) const;
|
bool Global) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PPCLinuxTargetAsmInfo : public PPCTargetAsmInfo,
|
struct PPCLinuxTargetAsmInfo : public PPCTargetAsmInfo<ELFTargetAsmInfo> {
|
||||||
public ELFTargetAsmInfo {
|
|
||||||
explicit PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM);
|
explicit PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM);
|
||||||
virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
|
virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
|
||||||
bool Global) const;
|
bool Global) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user