]> granicus.if.org Git - clang/commitdiff
Remove the SystemZ backend.
authorDan Gohman <gohman@apple.com>
Mon, 24 Oct 2011 23:48:52 +0000 (23:48 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 24 Oct 2011 23:48:52 +0000 (23:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142879 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp
lib/CodeGen/TargetInfo.cpp
lib/Driver/Tools.cpp
utils/C++Tests/LLVM-Code-Compile/lit.local.cfg
utils/C++Tests/LLVM-Code-Symbols/lit.local.cfg
utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg

index e8380f0d936690084c7e9a2d72a713706e3c8138..d852f4c0fc848009b97c1cd637581830a17bb37b 100644 (file)
@@ -2932,66 +2932,6 @@ namespace {
   }
 }
 
-
-namespace {
-  class SystemZTargetInfo : public TargetInfo {
-    static const char * const GCCRegNames[];
-  public:
-    SystemZTargetInfo(const std::string& triple) : TargetInfo(triple) {
-      TLSSupported = false;
-      IntWidth = IntAlign = 32;
-      LongWidth = LongLongWidth = LongAlign = LongLongAlign = 64;
-      PointerWidth = PointerAlign = 64;
-      DescriptionString = "E-p:64:64:64-i8:8:16-i16:16:16-i32:32:32-"
-      "i64:64:64-f32:32:32-f64:64:64-f128:128:128-a0:16:16-n32:64";
-   }
-    virtual void getTargetDefines(const LangOptions &Opts,
-                                  MacroBuilder &Builder) const {
-      Builder.defineMacro("__s390__");
-      Builder.defineMacro("__s390x__");
-    }
-    virtual void getTargetBuiltins(const Builtin::Info *&Records,
-                                   unsigned &NumRecords) const {
-      // FIXME: Implement.
-      Records = 0;
-      NumRecords = 0;
-    }
-
-    virtual void getGCCRegNames(const char * const *&Names,
-                                unsigned &NumNames) const;
-    virtual void getGCCRegAliases(const GCCRegAlias *&Aliases,
-                                  unsigned &NumAliases) const {
-      // No aliases.
-      Aliases = 0;
-      NumAliases = 0;
-    }
-    virtual bool validateAsmConstraint(const char *&Name,
-                                       TargetInfo::ConstraintInfo &info) const {
-      // FIXME: implement
-      return true;
-    }
-    virtual const char *getClobbers() const {
-      // FIXME: Is this really right?
-      return "";
-    }
-    virtual const char *getVAListDeclaration() const {
-      // FIXME: implement
-      return "typedef char* __builtin_va_list;";
-   }
-  };
-
-  const char * const SystemZTargetInfo::GCCRegNames[] = {
-    "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
-    "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
-  };
-
-  void SystemZTargetInfo::getGCCRegNames(const char * const *&Names,
-                                         unsigned &NumNames) const {
-    Names = GCCRegNames;
-    NumNames = llvm::array_lengthof(GCCRegNames);
-  }
-}
-
 namespace {
   class BlackfinTargetInfo : public TargetInfo {
     static const char * const GCCRegNames[];
@@ -3677,9 +3617,6 @@ static TargetInfo *AllocateTarget(const std::string &T) {
   case llvm::Triple::cellspu:
     return new PS3SPUTargetInfo<PPC64TargetInfo>(T);
 
-  case llvm::Triple::systemz:
-    return new SystemZTargetInfo(T);
-
   case llvm::Triple::tce:
     return new TCETargetInfo(T);
 
index e1dc8f7ffdbdd24c9700e742134770285bd95d2a..3744a29b3e0e0bb96f50d64c95a84085d5aaca61 100644 (file)
@@ -2828,85 +2828,6 @@ void PTXTargetCodeGenInfo::SetTargetAttributes(const Decl *D,
 
 }
 
-//===----------------------------------------------------------------------===//
-// SystemZ ABI Implementation
-//===----------------------------------------------------------------------===//
-
-namespace {
-
-class SystemZABIInfo : public ABIInfo {
-public:
-  SystemZABIInfo(CodeGenTypes &CGT) : ABIInfo(CGT) {}
-
-  bool isPromotableIntegerType(QualType Ty) const;
-
-  ABIArgInfo classifyReturnType(QualType RetTy) const;
-  ABIArgInfo classifyArgumentType(QualType RetTy) const;
-
-  virtual void computeInfo(CGFunctionInfo &FI) const {
-    FI.getReturnInfo() = classifyReturnType(FI.getReturnType());
-    for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end();
-         it != ie; ++it)
-      it->info = classifyArgumentType(it->type);
-  }
-
-  virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
-                                 CodeGenFunction &CGF) const;
-};
-
-class SystemZTargetCodeGenInfo : public TargetCodeGenInfo {
-public:
-  SystemZTargetCodeGenInfo(CodeGenTypes &CGT)
-    : TargetCodeGenInfo(new SystemZABIInfo(CGT)) {}
-};
-
-}
-
-bool SystemZABIInfo::isPromotableIntegerType(QualType Ty) const {
-  // SystemZ ABI requires all 8, 16 and 32 bit quantities to be extended.
-  if (const BuiltinType *BT = Ty->getAs<BuiltinType>())
-    switch (BT->getKind()) {
-    case BuiltinType::Bool:
-    case BuiltinType::Char_S:
-    case BuiltinType::Char_U:
-    case BuiltinType::SChar:
-    case BuiltinType::UChar:
-    case BuiltinType::Short:
-    case BuiltinType::UShort:
-    case BuiltinType::Int:
-    case BuiltinType::UInt:
-      return true;
-    default:
-      return false;
-    }
-  return false;
-}
-
-llvm::Value *SystemZABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
-                                       CodeGenFunction &CGF) const {
-  // FIXME: Implement
-  return 0;
-}
-
-
-ABIArgInfo SystemZABIInfo::classifyReturnType(QualType RetTy) const {
-  if (RetTy->isVoidType())
-    return ABIArgInfo::getIgnore();
-  if (isAggregateTypeForABI(RetTy))
-    return ABIArgInfo::getIndirect(0);
-
-  return (isPromotableIntegerType(RetTy) ?
-          ABIArgInfo::getExtend() : ABIArgInfo::getDirect());
-}
-
-ABIArgInfo SystemZABIInfo::classifyArgumentType(QualType Ty) const {
-  if (isAggregateTypeForABI(Ty))
-    return ABIArgInfo::getIndirect(0);
-
-  return (isPromotableIntegerType(Ty) ?
-          ABIArgInfo::getExtend() : ABIArgInfo::getDirect());
-}
-
 //===----------------------------------------------------------------------===//
 // MBlaze ABI Implementation
 //===----------------------------------------------------------------------===//
@@ -3317,9 +3238,6 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
   case llvm::Triple::ptx64:
     return *(TheTargetCodeGenInfo = new PTXTargetCodeGenInfo(Types));
 
-  case llvm::Triple::systemz:
-    return *(TheTargetCodeGenInfo = new SystemZTargetCodeGenInfo(Types));
-
   case llvm::Triple::mblaze:
     return *(TheTargetCodeGenInfo = new MBlazeTargetCodeGenInfo(Types));
 
index 42041d65666af7ab00d1bb1590c3c92ef8a167b1..11af01c651014669668d417607ce8ccfa1c80d0a 100644 (file)
@@ -507,9 +507,6 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) {
     if (Triple.isOSDarwin())
       return true;
     return false;
-
-  case llvm::Triple::systemz:
-    return false;
   }
 }
 
index 6676e311e3ecd016edb355e375675c91510c6311..64ddb88c7e7362034da2b1ff2e31090abd727ade 100644 (file)
@@ -28,7 +28,6 @@ cxxflags = ['-D__STDC_LIMIT_MACROS',
             '-I%s/lib/Target/PIC16' % root.llvm_src_root,
             '-I%s/lib/Target/PowerPC' % root.llvm_src_root,
             '-I%s/lib/Target/Sparc' % root.llvm_src_root,
-            '-I%s/lib/Target/SystemZ' % root.llvm_src_root,
             '-I%s/lib/Target/X86' % root.llvm_src_root,
             '-I%s/lib/Target/XCore' % root.llvm_src_root,
             '-I%s/lib/Target/Alpha' % target_obj_root,
@@ -43,7 +42,6 @@ cxxflags = ['-D__STDC_LIMIT_MACROS',
             '-I%s/lib/Target/PIC16' % target_obj_root,
             '-I%s/lib/Target/PowerPC' % target_obj_root,
             '-I%s/lib/Target/Sparc' % target_obj_root,
-            '-I%s/lib/Target/SystemZ' % target_obj_root,
             '-I%s/lib/Target/X86' % target_obj_root,
             '-I%s/lib/Target/XCore' % target_obj_root];
 
index c328a25127d9e47a5c698382819e588ccaa2d3d6..4269b903a15fa08629defa4113041ba9d1f44c3a 100644 (file)
@@ -28,7 +28,6 @@ cxxflags = ['-D__STDC_LIMIT_MACROS',
             '-I%s/lib/Target/PIC16' % root.llvm_src_root,
             '-I%s/lib/Target/PowerPC' % root.llvm_src_root,
             '-I%s/lib/Target/Sparc' % root.llvm_src_root,
-            '-I%s/lib/Target/SystemZ' % root.llvm_src_root,
             '-I%s/lib/Target/X86' % root.llvm_src_root,
             '-I%s/lib/Target/XCore' % root.llvm_src_root,
             '-I%s/lib/Target/Alpha' % target_obj_root,
@@ -43,7 +42,6 @@ cxxflags = ['-D__STDC_LIMIT_MACROS',
             '-I%s/lib/Target/PIC16' % target_obj_root,
             '-I%s/lib/Target/PowerPC' % target_obj_root,
             '-I%s/lib/Target/Sparc' % target_obj_root,
-            '-I%s/lib/Target/SystemZ' % target_obj_root,
             '-I%s/lib/Target/X86' % target_obj_root,
             '-I%s/lib/Target/XCore' % target_obj_root];
 
index 6e679659c44c916e4e3fc5974f5b64b68b5dd8da..d9263e6ffc7b6a9cd2ba0050321249bea821ab23 100644 (file)
@@ -27,7 +27,6 @@ cxxflags = ['-D__STDC_LIMIT_MACROS',
             '-I%s/lib/Target/PIC16' % root.llvm_src_root,
             '-I%s/lib/Target/PowerPC' % root.llvm_src_root,
             '-I%s/lib/Target/Sparc' % root.llvm_src_root,
-            '-I%s/lib/Target/SystemZ' % root.llvm_src_root,
             '-I%s/lib/Target/X86' % root.llvm_src_root,
             '-I%s/lib/Target/XCore' % root.llvm_src_root,
             '-I%s/lib/Target/Alpha' % target_obj_root,
@@ -42,7 +41,6 @@ cxxflags = ['-D__STDC_LIMIT_MACROS',
             '-I%s/lib/Target/PIC16' % target_obj_root,
             '-I%s/lib/Target/PowerPC' % target_obj_root,
             '-I%s/lib/Target/Sparc' % target_obj_root,
-            '-I%s/lib/Target/SystemZ' % target_obj_root,
             '-I%s/lib/Target/X86' % target_obj_root,
             '-I%s/lib/Target/XCore' % target_obj_root];