mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Make all of the TargetMachine subclasses use the new string TargetData methods.
This is part of the on-going work on PR 761. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28414 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a831a6c1c5
commit
d988b32aba
@ -33,7 +33,7 @@ namespace {
|
||||
///
|
||||
ARMTargetMachine::ARMTargetMachine(const Module &M, const std::string &FS)
|
||||
: TargetMachine("ARM"),
|
||||
DataLayout("ARM", false, 4, 4),
|
||||
DataLayout(std::string("ARM"), std::string("E-p:32:32")),
|
||||
InstrInfo(),
|
||||
FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0) {
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ unsigned AlphaTargetMachine::getJITMatchQuality() {
|
||||
|
||||
AlphaTargetMachine::AlphaTargetMachine(const Module &M, const std::string &FS)
|
||||
: TargetMachine("alpha"),
|
||||
DataLayout("alpha", true),
|
||||
DataLayout(std::string("alpha"), std::string("e")),
|
||||
FrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0),
|
||||
JITInfo(*this),
|
||||
Subtarget(M, FS)
|
||||
|
@ -76,7 +76,7 @@ unsigned IA64TargetMachine::getModuleMatchQuality(const Module &M) {
|
||||
/// IA64TargetMachine ctor - Create an LP64 architecture model
|
||||
///
|
||||
IA64TargetMachine::IA64TargetMachine(const Module &M, const std::string &FS)
|
||||
: TargetMachine("IA64"), DataLayout("IA64", true),
|
||||
: TargetMachine("IA64"), DataLayout(std::string("IA64"), std::string("e")),
|
||||
FrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0),
|
||||
TLInfo(*this) { // FIXME? check this stuff
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ unsigned PPCTargetMachine::getModuleMatchQuality(const Module &M) {
|
||||
|
||||
PPCTargetMachine::PPCTargetMachine(const Module &M, const std::string &FS)
|
||||
: TargetMachine("PowerPC"),
|
||||
DataLayout("PowerPC", false, 4, 4, 4, 4, 4),
|
||||
DataLayout(std::string("PowerPC"), std::string("E-p:32:32-d:64:32-l:64:32")),
|
||||
Subtarget(M, FS), FrameInfo(*this, false), JITInfo(*this),
|
||||
TLInfo(*this), InstrItins(Subtarget.getInstrItineraryData()) {
|
||||
if (TargetDefault == PPCTarget) {
|
||||
|
@ -32,7 +32,7 @@ namespace {
|
||||
///
|
||||
SparcTargetMachine::SparcTargetMachine(const Module &M, const std::string &FS)
|
||||
: TargetMachine("Sparc"),
|
||||
DataLayout("Sparc", false, 4, 4),
|
||||
DataLayout(std::string("Sparc"), std::string("e-p:32:32")),
|
||||
Subtarget(M, FS), InstrInfo(Subtarget),
|
||||
FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0) {
|
||||
}
|
||||
|
@ -123,6 +123,10 @@ TargetData::TargetData(const std::string &TargetName,
|
||||
|
||||
TargetData::TargetData(const std::string &TargetName,
|
||||
const std::string &TargetDescription) {
|
||||
assert(!TargetName.empty() &&
|
||||
"ERROR: Tool did not specify a target data to use!");
|
||||
|
||||
|
||||
std::string temp = TargetDescription;
|
||||
|
||||
LittleEndian = false;
|
||||
@ -136,7 +140,7 @@ TargetData::TargetData(const std::string &TargetName,
|
||||
ByteAlignment = 1;
|
||||
BoolAlignment = 1;
|
||||
|
||||
while (temp.length() > 0) {
|
||||
while (!temp.empty()) {
|
||||
std::string token = getToken(temp, "-");
|
||||
|
||||
char signal = getToken(token, ":")[0];
|
||||
|
@ -69,7 +69,7 @@ unsigned X86TargetMachine::getModuleMatchQuality(const Module &M) {
|
||||
///
|
||||
X86TargetMachine::X86TargetMachine(const Module &M, const std::string &FS)
|
||||
: TargetMachine("X86"),
|
||||
DataLayout("X86", true, 4, 4, 4, 4, 4),
|
||||
DataLayout(std::string("X86"), std::string("e-p:32:32-d:64:32-l:64:32")),
|
||||
Subtarget(M, FS),
|
||||
FrameInfo(TargetFrameInfo::StackGrowsDown,
|
||||
Subtarget.getStackAlignment(), -4),
|
||||
|
Loading…
Reference in New Issue
Block a user