Added a check for vector size to gen_gccbuiltins.cpp.

Previously, gen_gccbuiltins was emitting intrinsics
that used vector types larger than 256 bits and those
are not defined in core.simd.
This commit is contained in:
Jernej Krempuš 2014-01-05 18:39:03 +01:00
parent 7436d94e09
commit 77c0192c06

View file

@ -55,6 +55,18 @@ string dtype(Record* rec)
type = type.substr(i);
}
if(vec.size() > 0 && type.size() > 0)
{
int typeSize, vecElements;
if(
sscanf(vec.c_str(), "%d", &vecElements) == 1 &&
sscanf(type.c_str() + 1, "%d", &typeSize) == 1 &&
typeSize * vecElements > 256)
{
return "";
}
}
if(type == "i8")
return "byte" + vec;
else if(type == "i16")