Add generic-32 target.

This commit is contained in:
Matt Pharr
2012-05-03 11:11:06 -07:00
parent ee1fe3aa9f
commit d99bd279e8
8 changed files with 283 additions and 203 deletions

View File

@@ -257,6 +257,14 @@ Target::GetTarget(const char *arch, const char *cpu, const char *isa,
t->allOffMaskIsSafe = true;
t->maskBitCount = 1;
}
else if (!strcasecmp(isa, "generic-32")) {
t->isa = Target::GENERIC;
t->nativeVectorWidth = 32;
t->vectorWidth = 32;
t->maskingIsFree = true;
t->allOffMaskIsSafe = true;
t->maskBitCount = 1;
}
else if (!strcasecmp(isa, "generic-1")) {
t->isa = Target::GENERIC;
t->nativeVectorWidth = 1;
@@ -313,6 +321,7 @@ Target::GetTarget(const char *arch, const char *cpu, const char *isa,
llvm::TargetMachine *targetMachine = t->GetTargetMachine();
const llvm::TargetData *targetData = targetMachine->getTargetData();
t->is32Bit = (targetData->getPointerSize() == 4);
Assert(t->vectorWidth <= ISPC_MAX_NVEC);
}
return !error;
@@ -344,7 +353,7 @@ Target::SupportedTargetISAs() {
#ifndef LLVM_3_0
", avx2, avx2-x2"
#endif // !LLVM_3_0
", generic-4, generic-8, generic-16, generic-1";
", generic-1, generic-4, generic-8, generic-16, generic-32";
}