return PrimaryTarget->getTargetTriple();
}
+const char *TargetInfo::getTargetPrefix() const {
+ return PrimaryTarget->getTargetPrefix();
+}
+
/// DiagnoseNonPortability - When a use of a non-portable target feature is
/// used, this method emits the diagnostic and marks the translation unit as
/// non-portable.
// Eventually, an unknown constraint should just be treated as 'g'.
assert(0 && "Unknown input constraint type!");
}
+ case '%': // commutative
+ // FIXME: Fail if % is used with the last operand.
+ break;
case 'i': // immediate integer.
break;
case 'r': // general register.
return 0;
}
+ const char *getTargetPrefix() {
+ return "ppc";
+ }
+
} // End namespace PPC
return "~{dirflag},~{fpsr},~{flags}";
}
+ const char *getTargetPrefix() {
+ return "x86";
+ }
+
} // End namespace X86
//===----------------------------------------------------------------------===//
virtual const char *getVAListDeclaration() const {
return getPPCVAListDeclaration();
}
+ virtual const char *getTargetPrefix() const {
+ return PPC::getTargetPrefix();
+ }
virtual void getGCCRegNames(const char * const *&Names,
unsigned &NumNames) const {
PPC::getGCCRegNames(Names, NumNames);
virtual const char *getVAListDeclaration() const {
return getPPCVAListDeclaration();
}
+ virtual const char *getTargetPrefix() const {
+ return PPC::getTargetPrefix();
+ }
virtual void getGCCRegNames(const char * const *&Names,
unsigned &NumNames) const {
PPC::getGCCRegNames(Names, NumNames);
virtual const char *getVAListDeclaration() const {
return getI386VAListDeclaration();
}
+ virtual const char *getTargetPrefix() const {
+ return X86::getTargetPrefix();
+ }
virtual void getGCCRegNames(const char * const *&Names,
unsigned &NumNames) const {
X86::getGCCRegNames(Names, NumNames);
virtual const char *getVAListDeclaration() const {
return getX86_64VAListDeclaration();
}
+ virtual const char *getTargetPrefix() const {
+ return X86::getTargetPrefix();
+ }
virtual void getGCCRegNames(const char * const *&Names,
unsigned &NumNames) const {
X86::getGCCRegNames(Names, NumNames);
virtual const char *getVAListDeclaration() const {
return getI386VAListDeclaration();
}
+ virtual const char *getTargetPrefix() const {
+ return X86::getTargetPrefix();
+ }
virtual void getGCCRegNames(const char * const *&Names,
unsigned &NumNames) const {
X86::getGCCRegNames(Names, NumNames);
return static_cast<unsigned>(Size);
}
+ /// getTargetPrefix - Return the target prefix used for identifying
+ /// llvm intrinsics.
+ const char *getTargetPrefix() const;
+
/// getTargetTriple - Return the target triple of the primary target.
const char *getTargetTriple() const;
/// TargetInfoImpl object was created from.
const char* getTargetTriple() const { return Triple.c_str(); }
+ virtual const char *getTargetPrefix() const = 0;
+
/// getTargetDefines - Return a list of the target-specific #define values set
/// when compiling to this target. Each string should be of the form
/// "#define X Y\n".