Skip to content

Commit cf78366

Browse files
author
Sebastien Bourdeauducq
committedMay 31, 2012
Mico32 -> LM32
1 parent ddbd2d4 commit cf78366

File tree

2 files changed

+26
-28
lines changed

2 files changed

+26
-28
lines changed
 

‎lib/Basic/Targets.cpp

+12-14
Original file line numberDiff line numberDiff line change
@@ -1135,14 +1135,14 @@ void MBlazeTargetInfo::getGCCRegAliases(const GCCRegAlias *&Aliases,
11351135
} // end anonymous namespace.
11361136

11371137
namespace {
1138-
// Mico32 abstract base class
1139-
class Mico32TargetInfo : public TargetInfo {
1138+
// LM32 abstract base class
1139+
class LM32TargetInfo : public TargetInfo {
11401140
static const char * const GCCRegNames[];
11411141
static const TargetInfo::GCCRegAlias GCCRegAliases[];
11421142
std::vector<llvm::StringRef> AvailableFeatures;
11431143

11441144
public:
1145-
Mico32TargetInfo(const std::string& triple) : TargetInfo(triple) {
1145+
LM32TargetInfo(const std::string& triple) : TargetInfo(triple) {
11461146
// PointerWidth = PointerAlign = 32;
11471147
// LongWidth = LongAlign = 32;
11481148
LongLongWidth = 64;
@@ -1154,7 +1154,7 @@ class Mico32TargetInfo : public TargetInfo {
11541154
// IntMaxType = SignedLong;
11551155
// UIntMaxType = UnsignedLong;
11561156
// Int64Type = SignedLongLong;
1157-
// This must match llvm/lib/Target/Mico32/Mico32TargetMachine.cpp
1157+
// This must match llvm/lib/Target/LM32/LM32TargetMachine.cpp
11581158
// DescriptionString = "E-p:32:32:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-a0:8:8-S32-s0:32:32-n32";
11591159
// DescriptionString = "E-p:32:32:32-i8:8:32-i16:16:32-i32:32:32-i64:64:64-a0:8:8-S32-s0:32:32-n32";
11601160
DescriptionString = "E-p:32:32:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-a0:8:8-S32-s0:32:32-n32";
@@ -1183,7 +1183,7 @@ DescriptionString = "E-p:32:32:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:3
11831183
return "typedef char* __builtin_va_list;";
11841184
}
11851185
virtual const char *getTargetPrefix() const {
1186-
return "mico32";
1186+
return "lm32";
11871187
}
11881188
virtual void getGCCRegNames(const char * const *&Names,
11891189
unsigned &NumNames) const;
@@ -1223,16 +1223,14 @@ DescriptionString = "E-p:32:32:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:3
12231223

12241224
};
12251225

1226-
/// Mico32TargetInfo::getTargetDefines - Return a set of the Mico32-specific
1226+
/// LM32TargetInfo::getTargetDefines - Return a set of the LM32-specific
12271227
/// #defines that are not tied to a specific subtarget.
1228-
void Mico32TargetInfo::getTargetDefines(const LangOptions &Opts,
1228+
void LM32TargetInfo::getTargetDefines(const LangOptions &Opts,
12291229
MacroBuilder &Builder) const {
12301230
// Target identification.
1231-
Builder.defineMacro("__mico32__");
12321231
Builder.defineMacro("__lm32__");
1233-
Builder.defineMacro("_ARCH_MICO32");
1234-
Builder.defineMacro("__MICO32__");
12351232
Builder.defineMacro("__LM32__");
1233+
Builder.defineMacro("_ARCH_LM32");
12361234

12371235
// Target properties.
12381236
Builder.defineMacro("_BIG_ENDIAN");
@@ -1243,14 +1241,14 @@ void Mico32TargetInfo::getTargetDefines(const LangOptions &Opts,
12431241
}
12441242

12451243

1246-
const char * const Mico32TargetInfo::GCCRegNames[] = {
1244+
const char * const LM32TargetInfo::GCCRegNames[] = {
12471245
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
12481246
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
12491247
"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
12501248
"r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31"
12511249
};
12521250

1253-
void Mico32TargetInfo::getGCCRegNames(const char * const *&Names,
1251+
void LM32TargetInfo::getGCCRegNames(const char * const *&Names,
12541252
unsigned &NumNames) const {
12551253
Names = GCCRegNames;
12561254
NumNames = llvm::array_lengthof(GCCRegNames);
@@ -3841,8 +3839,8 @@ static TargetInfo *AllocateTarget(const std::string &T) {
38413839
case llvm::Triple::mblaze:
38423840
return new MBlazeTargetInfo(T);
38433841

3844-
case llvm::Triple::mico32:
3845-
return new Mico32TargetInfo(T);
3842+
case llvm::Triple::lm32:
3843+
return new LM32TargetInfo(T);
38463844

38473845
case llvm::Triple::sparc:
38483846
switch (os) {

‎lib/CodeGen/TargetInfo.cpp

+14-14
Original file line numberDiff line numberDiff line change
@@ -3032,14 +3032,14 @@ void MSP430TargetCodeGenInfo::SetTargetAttributes(const Decl *D,
30323032
}
30333033

30343034
//===----------------------------------------------------------------------===//
3035-
// Mico32 ABI Implementation
3035+
// LM32 ABI Implementation
30363036
//===----------------------------------------------------------------------===//
30373037

30383038
namespace {
30393039

3040-
class Mico32ABIInfo : public ABIInfo {
3040+
class LM32ABIInfo : public ABIInfo {
30413041
public:
3042-
Mico32ABIInfo(CodeGenTypes &CGT) : ABIInfo(CGT) {}
3042+
LM32ABIInfo(CodeGenTypes &CGT) : ABIInfo(CGT) {}
30433043

30443044
bool isPromotableIntegerType(QualType Ty) const;
30453045

@@ -3050,18 +3050,18 @@ class Mico32ABIInfo : public ABIInfo {
30503050
CodeGenFunction &CGF) const;
30513051
};
30523052

3053-
class Mico32TargetCodeGenInfo : public TargetCodeGenInfo {
3053+
class LM32TargetCodeGenInfo : public TargetCodeGenInfo {
30543054
public:
3055-
Mico32TargetCodeGenInfo(CodeGenTypes &CGT)
3056-
: TargetCodeGenInfo(new Mico32ABIInfo(CGT)) {}
3055+
LM32TargetCodeGenInfo(CodeGenTypes &CGT)
3056+
: TargetCodeGenInfo(new LM32ABIInfo(CGT)) {}
30573057
void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
30583058
CodeGen::CodeGenModule &M) const;
30593059
};
30603060

30613061
}
30623062

30633063
// Copied from MBlaze
3064-
bool Mico32ABIInfo::isPromotableIntegerType(QualType Ty) const {
3064+
bool LM32ABIInfo::isPromotableIntegerType(QualType Ty) const {
30653065
// Extend all 8 and 16 bit quantities.
30663066
if (const BuiltinType *BT = Ty->getAs<BuiltinType>())
30673067
switch (BT->getKind()) {
@@ -3079,15 +3079,15 @@ bool Mico32ABIInfo::isPromotableIntegerType(QualType Ty) const {
30793079
return false;
30803080
}
30813081

3082-
void Mico32ABIInfo::computeInfo(CGFunctionInfo &FI) const {
3082+
void LM32ABIInfo::computeInfo(CGFunctionInfo &FI) const {
30833083
FI.getReturnInfo() = classifyReturnType(FI.getReturnType());
30843084
for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end();
30853085
it != ie; ++it)
30863086
it->info = classifyArgumentType(it->type);
30873087
}
30883088

30893089
// Copied from MIPS
3090-
ABIArgInfo Mico32ABIInfo::classifyArgumentType(QualType Ty) const {
3090+
ABIArgInfo LM32ABIInfo::classifyArgumentType(QualType Ty) const {
30913091
if (isAggregateTypeForABI(Ty)) {
30923092
// Ignore empty aggregates.
30933093
if (getContext().getTypeSize(Ty) == 0)
@@ -3110,7 +3110,7 @@ ABIArgInfo Mico32ABIInfo::classifyArgumentType(QualType Ty) const {
31103110
}
31113111

31123112
// Copied from MIPS
3113-
ABIArgInfo Mico32ABIInfo::classifyReturnType(QualType RetTy) const {
3113+
ABIArgInfo LM32ABIInfo::classifyReturnType(QualType RetTy) const {
31143114
if (RetTy->isVoidType())
31153115
return ABIArgInfo::getIgnore();
31163116

@@ -3128,12 +3128,12 @@ ABIArgInfo Mico32ABIInfo::classifyReturnType(QualType RetTy) const {
31283128
}
31293129

31303130

3131-
void Mico32TargetCodeGenInfo::SetTargetAttributes(const Decl *D,
3131+
void LM32TargetCodeGenInfo::SetTargetAttributes(const Decl *D,
31323132
llvm::GlobalValue *GV,
31333133
CodeGen::CodeGenModule &M) const {
31343134
}
31353135

3136-
llvm::Value *Mico32ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
3136+
llvm::Value *LM32ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
31373137
CodeGenFunction &CFG) const {
31383138
return 0;
31393139
}
@@ -3611,8 +3611,8 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
36113611
case llvm::Triple::mblaze:
36123612
return *(TheTargetCodeGenInfo = new MBlazeTargetCodeGenInfo(Types));
36133613

3614-
case llvm::Triple::mico32:
3615-
return *(TheTargetCodeGenInfo = new Mico32TargetCodeGenInfo(Types));
3614+
case llvm::Triple::lm32:
3615+
return *(TheTargetCodeGenInfo = new LM32TargetCodeGenInfo(Types));
36163616

36173617
case llvm::Triple::msp430:
36183618
return *(TheTargetCodeGenInfo = new MSP430TargetCodeGenInfo(Types));

0 commit comments

Comments
 (0)
Please sign in to comment.