forked from OSchip/llvm-project
parent
dfc96aea90
commit
53bb0ff685
|
@ -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);
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -507,9 +507,6 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) {
|
|||
if (Triple.isOSDarwin())
|
||||
return true;
|
||||
return false;
|
||||
|
||||
case llvm::Triple::systemz:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
Loading…
Reference in New Issue