mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-10 04:33:40 +00:00
pass "is64Bit" flag into PPC TAI ctors instead of a whole targetmachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78743 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
74da671c36
commit
5b67bb1922
@ -12,27 +12,19 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "PPCTargetAsmInfo.h"
|
#include "PPCTargetAsmInfo.h"
|
||||||
#include "PPCTargetMachine.h"
|
|
||||||
#include "llvm/Function.h"
|
|
||||||
#include "llvm/Support/Dwarf.h"
|
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
using namespace llvm::dwarf;
|
|
||||||
|
|
||||||
PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM) {
|
PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(bool is64Bit) {
|
||||||
PCSymbol = ".";
|
PCSymbol = ".";
|
||||||
CommentString = ";";
|
CommentString = ";";
|
||||||
ExceptionsType = ExceptionHandling::Dwarf;
|
ExceptionsType = ExceptionHandling::Dwarf;
|
||||||
|
|
||||||
const PPCSubtarget *Subtarget = &TM.getSubtarget<PPCSubtarget>();
|
if (!is64Bit)
|
||||||
bool isPPC64 = Subtarget->isPPC64();
|
|
||||||
|
|
||||||
if (!isPPC64)
|
|
||||||
Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode.
|
Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode.
|
||||||
AssemblerDialect = 0; // Old-Style mnemonics.
|
AssemblerDialect = 0; // Old-Style mnemonics.
|
||||||
}
|
}
|
||||||
|
|
||||||
PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) {
|
PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(bool is64Bit) {
|
||||||
CommentString = "#";
|
CommentString = "#";
|
||||||
GlobalPrefix = "";
|
GlobalPrefix = "";
|
||||||
PrivateGlobalPrefix = ".L";
|
PrivateGlobalPrefix = ".L";
|
||||||
@ -48,17 +40,14 @@ PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) {
|
|||||||
// Set up DWARF directives
|
// Set up DWARF directives
|
||||||
HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
|
HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
|
||||||
|
|
||||||
const PPCSubtarget *Subtarget = &TM.getSubtarget<PPCSubtarget>();
|
|
||||||
bool isPPC64 = Subtarget->isPPC64();
|
|
||||||
|
|
||||||
// Exceptions handling
|
// Exceptions handling
|
||||||
if (!isPPC64)
|
if (!is64Bit)
|
||||||
ExceptionsType = ExceptionHandling::Dwarf;
|
ExceptionsType = ExceptionHandling::Dwarf;
|
||||||
AbsoluteEHSectionOffsets = false;
|
AbsoluteEHSectionOffsets = false;
|
||||||
|
|
||||||
ZeroDirective = "\t.space\t";
|
ZeroDirective = "\t.space\t";
|
||||||
SetDirective = "\t.set";
|
SetDirective = "\t.set";
|
||||||
Data64bitsDirective = isPPC64 ? "\t.quad\t" : 0;
|
Data64bitsDirective = is64Bit ? "\t.quad\t" : 0;
|
||||||
AlignmentIsInBytes = false;
|
AlignmentIsInBytes = false;
|
||||||
LCOMMDirective = "\t.lcomm\t";
|
LCOMMDirective = "\t.lcomm\t";
|
||||||
AssemblerDialect = 1; // New-Style mnemonics.
|
AssemblerDialect = 1; // New-Style mnemonics.
|
||||||
|
@ -14,19 +14,17 @@
|
|||||||
#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/Support/Compiler.h"
|
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
struct PPCDarwinTargetAsmInfo : public DarwinTargetAsmInfo {
|
struct PPCDarwinTargetAsmInfo : public DarwinTargetAsmInfo {
|
||||||
explicit PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM);
|
explicit PPCDarwinTargetAsmInfo(bool is64Bit);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PPCLinuxTargetAsmInfo : public TargetAsmInfo {
|
struct PPCLinuxTargetAsmInfo : public TargetAsmInfo {
|
||||||
explicit PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM);
|
explicit PPCLinuxTargetAsmInfo(bool is64Bit);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace llvm
|
} // namespace llvm
|
||||||
|
Loading…
x
Reference in New Issue
Block a user