Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Mico32 -> LM32

  • Loading branch information...
commit cf783668a23026b7ab03c3e9626132b82a64ebe4 1 parent ddbd2d4
@sbourdeauducq sbourdeauducq authored
Showing with 26 additions and 28 deletions.
  1. +12 −14 lib/Basic/Targets.cpp
  2. +14 −14 lib/CodeGen/TargetInfo.cpp
View
26 lib/Basic/Targets.cpp
@@ -1135,14 +1135,14 @@ void MBlazeTargetInfo::getGCCRegAliases(const GCCRegAlias *&Aliases,
} // end anonymous namespace.
namespace {
-// Mico32 abstract base class
-class Mico32TargetInfo : public TargetInfo {
+// LM32 abstract base class
+class LM32TargetInfo : public TargetInfo {
static const char * const GCCRegNames[];
static const TargetInfo::GCCRegAlias GCCRegAliases[];
std::vector<llvm::StringRef> AvailableFeatures;
public:
- Mico32TargetInfo(const std::string& triple) : TargetInfo(triple) {
+ LM32TargetInfo(const std::string& triple) : TargetInfo(triple) {
// PointerWidth = PointerAlign = 32;
// LongWidth = LongAlign = 32;
LongLongWidth = 64;
@@ -1154,7 +1154,7 @@ class Mico32TargetInfo : public TargetInfo {
// IntMaxType = SignedLong;
// UIntMaxType = UnsignedLong;
// Int64Type = SignedLongLong;
- // This must match llvm/lib/Target/Mico32/Mico32TargetMachine.cpp
+ // This must match llvm/lib/Target/LM32/LM32TargetMachine.cpp
// 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";
// 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";
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
return "typedef char* __builtin_va_list;";
}
virtual const char *getTargetPrefix() const {
- return "mico32";
+ return "lm32";
}
virtual void getGCCRegNames(const char * const *&Names,
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
};
-/// Mico32TargetInfo::getTargetDefines - Return a set of the Mico32-specific
+/// LM32TargetInfo::getTargetDefines - Return a set of the LM32-specific
/// #defines that are not tied to a specific subtarget.
-void Mico32TargetInfo::getTargetDefines(const LangOptions &Opts,
+void LM32TargetInfo::getTargetDefines(const LangOptions &Opts,
MacroBuilder &Builder) const {
// Target identification.
- Builder.defineMacro("__mico32__");
Builder.defineMacro("__lm32__");
- Builder.defineMacro("_ARCH_MICO32");
- Builder.defineMacro("__MICO32__");
Builder.defineMacro("__LM32__");
+ Builder.defineMacro("_ARCH_LM32");
// Target properties.
Builder.defineMacro("_BIG_ENDIAN");
@@ -1243,14 +1241,14 @@ void Mico32TargetInfo::getTargetDefines(const LangOptions &Opts,
}
-const char * const Mico32TargetInfo::GCCRegNames[] = {
+const char * const LM32TargetInfo::GCCRegNames[] = {
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
"r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31"
};
-void Mico32TargetInfo::getGCCRegNames(const char * const *&Names,
+void LM32TargetInfo::getGCCRegNames(const char * const *&Names,
unsigned &NumNames) const {
Names = GCCRegNames;
NumNames = llvm::array_lengthof(GCCRegNames);
@@ -3841,8 +3839,8 @@ static TargetInfo *AllocateTarget(const std::string &T) {
case llvm::Triple::mblaze:
return new MBlazeTargetInfo(T);
- case llvm::Triple::mico32:
- return new Mico32TargetInfo(T);
+ case llvm::Triple::lm32:
+ return new LM32TargetInfo(T);
case llvm::Triple::sparc:
switch (os) {
View
28 lib/CodeGen/TargetInfo.cpp
@@ -3032,14 +3032,14 @@ void MSP430TargetCodeGenInfo::SetTargetAttributes(const Decl *D,
}
//===----------------------------------------------------------------------===//
-// Mico32 ABI Implementation
+// LM32 ABI Implementation
//===----------------------------------------------------------------------===//
namespace {
-class Mico32ABIInfo : public ABIInfo {
+class LM32ABIInfo : public ABIInfo {
public:
- Mico32ABIInfo(CodeGenTypes &CGT) : ABIInfo(CGT) {}
+ LM32ABIInfo(CodeGenTypes &CGT) : ABIInfo(CGT) {}
bool isPromotableIntegerType(QualType Ty) const;
@@ -3050,10 +3050,10 @@ class Mico32ABIInfo : public ABIInfo {
CodeGenFunction &CGF) const;
};
-class Mico32TargetCodeGenInfo : public TargetCodeGenInfo {
+class LM32TargetCodeGenInfo : public TargetCodeGenInfo {
public:
- Mico32TargetCodeGenInfo(CodeGenTypes &CGT)
- : TargetCodeGenInfo(new Mico32ABIInfo(CGT)) {}
+ LM32TargetCodeGenInfo(CodeGenTypes &CGT)
+ : TargetCodeGenInfo(new LM32ABIInfo(CGT)) {}
void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
CodeGen::CodeGenModule &M) const;
};
@@ -3061,7 +3061,7 @@ class Mico32TargetCodeGenInfo : public TargetCodeGenInfo {
}
// Copied from MBlaze
-bool Mico32ABIInfo::isPromotableIntegerType(QualType Ty) const {
+bool LM32ABIInfo::isPromotableIntegerType(QualType Ty) const {
// Extend all 8 and 16 bit quantities.
if (const BuiltinType *BT = Ty->getAs<BuiltinType>())
switch (BT->getKind()) {
@@ -3079,7 +3079,7 @@ bool Mico32ABIInfo::isPromotableIntegerType(QualType Ty) const {
return false;
}
-void Mico32ABIInfo::computeInfo(CGFunctionInfo &FI) const {
+void LM32ABIInfo::computeInfo(CGFunctionInfo &FI) const {
FI.getReturnInfo() = classifyReturnType(FI.getReturnType());
for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end();
it != ie; ++it)
@@ -3087,7 +3087,7 @@ void Mico32ABIInfo::computeInfo(CGFunctionInfo &FI) const {
}
// Copied from MIPS
-ABIArgInfo Mico32ABIInfo::classifyArgumentType(QualType Ty) const {
+ABIArgInfo LM32ABIInfo::classifyArgumentType(QualType Ty) const {
if (isAggregateTypeForABI(Ty)) {
// Ignore empty aggregates.
if (getContext().getTypeSize(Ty) == 0)
@@ -3110,7 +3110,7 @@ ABIArgInfo Mico32ABIInfo::classifyArgumentType(QualType Ty) const {
}
// Copied from MIPS
-ABIArgInfo Mico32ABIInfo::classifyReturnType(QualType RetTy) const {
+ABIArgInfo LM32ABIInfo::classifyReturnType(QualType RetTy) const {
if (RetTy->isVoidType())
return ABIArgInfo::getIgnore();
@@ -3128,12 +3128,12 @@ ABIArgInfo Mico32ABIInfo::classifyReturnType(QualType RetTy) const {
}
-void Mico32TargetCodeGenInfo::SetTargetAttributes(const Decl *D,
+void LM32TargetCodeGenInfo::SetTargetAttributes(const Decl *D,
llvm::GlobalValue *GV,
CodeGen::CodeGenModule &M) const {
}
-llvm::Value *Mico32ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
+llvm::Value *LM32ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
CodeGenFunction &CFG) const {
return 0;
}
@@ -3611,8 +3611,8 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
case llvm::Triple::mblaze:
return *(TheTargetCodeGenInfo = new MBlazeTargetCodeGenInfo(Types));
- case llvm::Triple::mico32:
- return *(TheTargetCodeGenInfo = new Mico32TargetCodeGenInfo(Types));
+ case llvm::Triple::lm32:
+ return *(TheTargetCodeGenInfo = new LM32TargetCodeGenInfo(Types));
case llvm::Triple::msp430:
return *(TheTargetCodeGenInfo = new MSP430TargetCodeGenInfo(Types));
Please sign in to comment.
Something went wrong with that request. Please try again.