forked from OSchip/llvm-project
Add TargetInfo for r600.
Patch by Tom Stellard. llvm-svn: 165850
This commit is contained in:
parent
9ee2d04753
commit
d13b41e32a
|
@ -1213,6 +1213,71 @@ namespace {
|
|||
};
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
static const unsigned R600AddrSpaceMap[] = {
|
||||
1, // opencl_global
|
||||
3, // opencl_local
|
||||
2, // opencl_constant
|
||||
1, // cuda_device
|
||||
2, // cuda_constant
|
||||
3 // cuda_shared
|
||||
};
|
||||
|
||||
class R600TargetInfo : public TargetInfo {
|
||||
public:
|
||||
R600TargetInfo(const std::string& triple) : TargetInfo(triple) {
|
||||
DescriptionString =
|
||||
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16"
|
||||
"-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:32:32"
|
||||
"-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64"
|
||||
"-v96:128:128-v128:128:128-v192:256:256-v256:256:256"
|
||||
"-v512:512:512-v1024:1024:1024-v2048:2048:2048"
|
||||
"-n8:16:32:64";
|
||||
AddrSpaceMap = &R600AddrSpaceMap;
|
||||
}
|
||||
|
||||
virtual const char * getClobbers() const {
|
||||
return "";
|
||||
}
|
||||
|
||||
virtual void getGCCRegNames(const char * const *&Names,
|
||||
unsigned &numNames) const {
|
||||
Names = NULL;
|
||||
numNames = 0;
|
||||
}
|
||||
|
||||
virtual void getGCCRegAliases(const GCCRegAlias *&Aliases,
|
||||
unsigned &NumAliases) const {
|
||||
Aliases = NULL;
|
||||
NumAliases = 0;
|
||||
}
|
||||
|
||||
virtual bool validateAsmConstraint(const char *&Name,
|
||||
TargetInfo::ConstraintInfo &info) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void getTargetBuiltins(const Builtin::Info *&Records,
|
||||
unsigned &NumRecords) const {
|
||||
Records = NULL;
|
||||
NumRecords = 0;
|
||||
}
|
||||
|
||||
|
||||
virtual void getTargetDefines(const LangOptions &Opts,
|
||||
MacroBuilder &Builder) const {
|
||||
Builder.defineMacro("__R600__");
|
||||
}
|
||||
|
||||
virtual BuiltinVaListKind getBuiltinVaListKind() const {
|
||||
return TargetInfo::CharPtrBuiltinVaList;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
} // end anonymous namespace
|
||||
|
||||
namespace {
|
||||
// MBlaze abstract base class
|
||||
class MBlazeTargetInfo : public TargetInfo {
|
||||
|
@ -4426,6 +4491,9 @@ static TargetInfo *AllocateTarget(const std::string &T) {
|
|||
case llvm::Triple::mblaze:
|
||||
return new MBlazeTargetInfo(T);
|
||||
|
||||
case llvm::Triple::r600:
|
||||
return new R600TargetInfo(T);
|
||||
|
||||
case llvm::Triple::sparc:
|
||||
switch (os) {
|
||||
case llvm::Triple::Linux:
|
||||
|
|
Loading…
Reference in New Issue