Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Mico32 -> LM32

  • Loading branch information...
commit cf783668a23026b7ab03c3e9626132b82a64ebe4 1 parent ddbd2d4
Sébastien Bourdeauducq authored May 31, 2012
26  lib/Basic/Targets.cpp
@@ -1135,14 +1135,14 @@ void MBlazeTargetInfo::getGCCRegAliases(const GCCRegAlias *&Aliases,
1135 1135
 } // end anonymous namespace.
1136 1136
 
1137 1137
 namespace {
1138  
-// Mico32 abstract base class
1139  
-class Mico32TargetInfo : public TargetInfo {
  1138
+// LM32 abstract base class
  1139
+class LM32TargetInfo : public TargetInfo {
1140 1140
   static const char * const GCCRegNames[];
1141 1141
   static const TargetInfo::GCCRegAlias GCCRegAliases[];
1142 1142
   std::vector<llvm::StringRef> AvailableFeatures;
1143 1143
 
1144 1144
 public:
1145  
-  Mico32TargetInfo(const std::string& triple) : TargetInfo(triple) {
  1145
+  LM32TargetInfo(const std::string& triple) : TargetInfo(triple) {
1146 1146
 //    PointerWidth = PointerAlign = 32;
1147 1147
 //    LongWidth = LongAlign = 32;
1148 1148
     LongLongWidth = 64;
@@ -1154,7 +1154,7 @@ class Mico32TargetInfo : public TargetInfo {
1154 1154
 //    IntMaxType = SignedLong;
1155 1155
 //    UIntMaxType = UnsignedLong;
1156 1156
 //    Int64Type = SignedLongLong;
1157  
-    // This must match llvm/lib/Target/Mico32/Mico32TargetMachine.cpp
  1157
+    // This must match llvm/lib/Target/LM32/LM32TargetMachine.cpp
1158 1158
 //    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";
1159 1159
 //    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";
1160 1160
 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
1183 1183
     return "typedef char* __builtin_va_list;";
1184 1184
   }
1185 1185
   virtual const char *getTargetPrefix() const {
1186  
-    return "mico32";
  1186
+    return "lm32";
1187 1187
   }
1188 1188
   virtual void getGCCRegNames(const char * const *&Names,
1189 1189
                               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
1223 1223
 
1224 1224
 };
1225 1225
 
1226  
-/// Mico32TargetInfo::getTargetDefines - Return a set of the Mico32-specific
  1226
+/// LM32TargetInfo::getTargetDefines - Return a set of the LM32-specific
1227 1227
 /// #defines that are not tied to a specific subtarget.
1228  
-void Mico32TargetInfo::getTargetDefines(const LangOptions &Opts,
  1228
+void LM32TargetInfo::getTargetDefines(const LangOptions &Opts,
1229 1229
                                      MacroBuilder &Builder) const {
1230 1230
   // Target identification.
1231  
-  Builder.defineMacro("__mico32__");
1232 1231
   Builder.defineMacro("__lm32__");
1233  
-  Builder.defineMacro("_ARCH_MICO32");
1234  
-  Builder.defineMacro("__MICO32__");
1235 1232
   Builder.defineMacro("__LM32__");
  1233
+  Builder.defineMacro("_ARCH_LM32");
1236 1234
 
1237 1235
   // Target properties.
1238 1236
   Builder.defineMacro("_BIG_ENDIAN");
@@ -1243,14 +1241,14 @@ void Mico32TargetInfo::getTargetDefines(const LangOptions &Opts,
1243 1241
 }
1244 1242
 
1245 1243
 
1246  
-const char * const Mico32TargetInfo::GCCRegNames[] = {
  1244
+const char * const LM32TargetInfo::GCCRegNames[] = {
1247 1245
   "r0",   "r1",   "r2",   "r3",   "r4",   "r5",   "r6",   "r7",
1248 1246
   "r8",   "r9",   "r10",  "r11",  "r12",  "r13",  "r14",  "r15",
1249 1247
   "r16",  "r17",  "r18",  "r19",  "r20",  "r21",  "r22",  "r23",
1250 1248
   "r24",  "r25",  "r26",  "r27",  "r28",  "r29",  "r30",  "r31"
1251 1249
 };
1252 1250
 
1253  
-void Mico32TargetInfo::getGCCRegNames(const char * const *&Names,
  1251
+void LM32TargetInfo::getGCCRegNames(const char * const *&Names,
1254 1252
                                    unsigned &NumNames) const {
1255 1253
   Names = GCCRegNames;
1256 1254
   NumNames = llvm::array_lengthof(GCCRegNames);
@@ -3841,8 +3839,8 @@ static TargetInfo *AllocateTarget(const std::string &T) {
3841 3839
   case llvm::Triple::mblaze:
3842 3840
     return new MBlazeTargetInfo(T);
3843 3841
     
3844  
-  case llvm::Triple::mico32:
3845  
-    return new Mico32TargetInfo(T);
  3842
+  case llvm::Triple::lm32:
  3843
+    return new LM32TargetInfo(T);
3846 3844
 
3847 3845
   case llvm::Triple::sparc:
3848 3846
     switch (os) {
28  lib/CodeGen/TargetInfo.cpp
@@ -3032,14 +3032,14 @@ void MSP430TargetCodeGenInfo::SetTargetAttributes(const Decl *D,
3032 3032
 }
3033 3033
 
3034 3034
 //===----------------------------------------------------------------------===//
3035  
-// Mico32 ABI Implementation
  3035
+// LM32 ABI Implementation
3036 3036
 //===----------------------------------------------------------------------===//
3037 3037
 
3038 3038
 namespace {
3039 3039
 
3040  
-class Mico32ABIInfo : public ABIInfo {
  3040
+class LM32ABIInfo : public ABIInfo {
3041 3041
 public:
3042  
-  Mico32ABIInfo(CodeGenTypes &CGT) : ABIInfo(CGT) {}
  3042
+  LM32ABIInfo(CodeGenTypes &CGT) : ABIInfo(CGT) {}
3043 3043
 
3044 3044
   bool isPromotableIntegerType(QualType Ty) const;
3045 3045
 
@@ -3050,10 +3050,10 @@ class Mico32ABIInfo : public ABIInfo {
3050 3050
                                  CodeGenFunction &CGF) const;
3051 3051
 };
3052 3052
 
3053  
-class Mico32TargetCodeGenInfo : public TargetCodeGenInfo {
  3053
+class LM32TargetCodeGenInfo : public TargetCodeGenInfo {
3054 3054
 public:
3055  
-  Mico32TargetCodeGenInfo(CodeGenTypes &CGT)
3056  
-    : TargetCodeGenInfo(new Mico32ABIInfo(CGT)) {}
  3055
+  LM32TargetCodeGenInfo(CodeGenTypes &CGT)
  3056
+    : TargetCodeGenInfo(new LM32ABIInfo(CGT)) {}
3057 3057
   void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
3058 3058
                            CodeGen::CodeGenModule &M) const;
3059 3059
 };
@@ -3061,7 +3061,7 @@ class Mico32TargetCodeGenInfo : public TargetCodeGenInfo {
3061 3061
 }
3062 3062
 
3063 3063
 // Copied from MBlaze
3064  
-bool Mico32ABIInfo::isPromotableIntegerType(QualType Ty) const {
  3064
+bool LM32ABIInfo::isPromotableIntegerType(QualType Ty) const {
3065 3065
   // Extend all 8 and 16 bit quantities.
3066 3066
   if (const BuiltinType *BT = Ty->getAs<BuiltinType>())
3067 3067
     switch (BT->getKind()) {
@@ -3079,7 +3079,7 @@ bool Mico32ABIInfo::isPromotableIntegerType(QualType Ty) const {
3079 3079
   return false;
3080 3080
 }
3081 3081
 
3082  
-void Mico32ABIInfo::computeInfo(CGFunctionInfo &FI) const {
  3082
+void LM32ABIInfo::computeInfo(CGFunctionInfo &FI) const {
3083 3083
   FI.getReturnInfo() = classifyReturnType(FI.getReturnType());
3084 3084
   for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end();
3085 3085
        it != ie; ++it)
@@ -3087,7 +3087,7 @@ void Mico32ABIInfo::computeInfo(CGFunctionInfo &FI) const {
3087 3087
 }
3088 3088
 
3089 3089
 // Copied from MIPS
3090  
-ABIArgInfo Mico32ABIInfo::classifyArgumentType(QualType Ty) const {
  3090
+ABIArgInfo LM32ABIInfo::classifyArgumentType(QualType Ty) const {
3091 3091
   if (isAggregateTypeForABI(Ty)) {
3092 3092
     // Ignore empty aggregates.
3093 3093
     if (getContext().getTypeSize(Ty) == 0)
@@ -3110,7 +3110,7 @@ ABIArgInfo Mico32ABIInfo::classifyArgumentType(QualType Ty) const {
3110 3110
 }
3111 3111
 
3112 3112
 // Copied from MIPS
3113  
-ABIArgInfo Mico32ABIInfo::classifyReturnType(QualType RetTy) const {
  3113
+ABIArgInfo LM32ABIInfo::classifyReturnType(QualType RetTy) const {
3114 3114
   if (RetTy->isVoidType())
3115 3115
     return ABIArgInfo::getIgnore();
3116 3116
 
@@ -3128,12 +3128,12 @@ ABIArgInfo Mico32ABIInfo::classifyReturnType(QualType RetTy) const {
3128 3128
 }
3129 3129
 
3130 3130
 
3131  
-void Mico32TargetCodeGenInfo::SetTargetAttributes(const Decl *D,
  3131
+void LM32TargetCodeGenInfo::SetTargetAttributes(const Decl *D,
3132 3132
                                                   llvm::GlobalValue *GV,
3133 3133
                                              CodeGen::CodeGenModule &M) const {
3134 3134
 }
3135 3135
 
3136  
-llvm::Value *Mico32ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
  3136
+llvm::Value *LM32ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
3137 3137
                                    CodeGenFunction &CFG) const {
3138 3138
   return 0;
3139 3139
 }
@@ -3611,8 +3611,8 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
3611 3611
   case llvm::Triple::mblaze:
3612 3612
     return *(TheTargetCodeGenInfo = new MBlazeTargetCodeGenInfo(Types));
3613 3613
   
3614  
-  case llvm::Triple::mico32:
3615  
-    return *(TheTargetCodeGenInfo = new Mico32TargetCodeGenInfo(Types));
  3614
+  case llvm::Triple::lm32:
  3615
+    return *(TheTargetCodeGenInfo = new LM32TargetCodeGenInfo(Types));
3616 3616
 
3617 3617
   case llvm::Triple::msp430:
3618 3618
     return *(TheTargetCodeGenInfo = new MSP430TargetCodeGenInfo(Types));

0 notes on commit cf78366

Please sign in to comment.
Something went wrong with that request. Please try again.