nvptx64 generates 2 targets: task and normal function for nvptx64 and export for avx only

This commit is contained in:
Evghenii
2013-10-29 14:46:51 +01:00
parent b31fc6f66d
commit f15cdc03e3
4 changed files with 28 additions and 11 deletions

View File

@@ -531,7 +531,7 @@ Declarator::InitFromType(const Type *baseType, DeclSpecs *ds) {
returnType = returnType->ResolveUnboundVariability(Variability::Varying);
bool isTask = ds && ((ds->typeQualifiers & TYPEQUAL_TASK) != 0);
if (isTask && g->target->getISA() == Target::NVPTX64)
if (isTask && g->target->isPTX()) //getISA() == Target::NVPTX64)
{
ds->storageClass = SC_EXTERN_C;
ds->typeQualifiers |= TYPEQUAL_UNMASKED;
@@ -546,13 +546,12 @@ Declarator::InitFromType(const Type *baseType, DeclSpecs *ds) {
"qualifiers");
return;
}
#if 0 /* NVPTX64::task_and_externC */
if (isExternC && isTask) {
Error(pos, "Function can't have both \"extern \"C\"\" and \"task\" "
"qualifiers");
return;
}
#endif
if (!g->target->isPTX())
if (isExternC && isTask) {
Error(pos, "Function can't have both \"extern \"C\"\" and \"task\" "
"qualifiers");
return;
}
if (isExternC && isExported) {
Error(pos, "Function can't have both \"extern \"C\"\" and \"export\" "
"qualifiers");