mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-23 04:16:42 +00:00
Revert r114596, it's breaking a few tests.
llvm-svn: 114659
This commit is contained in:
parent
51d3d883cb
commit
6af7c7163f
@ -89,7 +89,7 @@ static char Narrow(const char t) {
|
|||||||
return 'i';
|
return 'i';
|
||||||
case 'f':
|
case 'f':
|
||||||
return 'h';
|
return 'h';
|
||||||
default: throw "unhandled type in narrow!";
|
default: throw "unhandled type in widen!";
|
||||||
}
|
}
|
||||||
return '\0';
|
return '\0';
|
||||||
}
|
}
|
||||||
@ -155,10 +155,6 @@ static char ModType(const char mod, char type, bool &quad, bool &poly,
|
|||||||
case 'n':
|
case 'n':
|
||||||
type = Widen(type);
|
type = Widen(type);
|
||||||
break;
|
break;
|
||||||
case 'i':
|
|
||||||
type = 'i';
|
|
||||||
scal = true;
|
|
||||||
break;
|
|
||||||
case 'l':
|
case 'l':
|
||||||
type = 'l';
|
type = 'l';
|
||||||
scal = true;
|
scal = true;
|
||||||
@ -811,27 +807,14 @@ static std::string GenBuiltin(const std::string &name, const std::string &proto,
|
|||||||
|
|
||||||
for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
|
for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
|
||||||
std::string args = std::string(&arg, 1);
|
std::string args = std::string(&arg, 1);
|
||||||
bool argquad = quad;
|
|
||||||
bool scal = false;
|
|
||||||
|
|
||||||
(void) ModType(proto[i], type, argquad, dummy, dummy, scal, dummy, dummy);
|
|
||||||
bool explicitcast = define && !scal;
|
|
||||||
|
|
||||||
if (define)
|
if (define)
|
||||||
args = "(" + args + ")";
|
args = "(" + args + ")";
|
||||||
if (explicitcast) {
|
|
||||||
unsigned builtinelts = quad ? 16 : 8;
|
|
||||||
args = "(__neon_int8x" + utostr(builtinelts) + "_t)(" + args;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle multiple-vector values specially, emitting each subvector as an
|
// Handle multiple-vector values specially, emitting each subvector as an
|
||||||
// argument to the __builtin.
|
// argument to the __builtin.
|
||||||
if (structTypes && (proto[i] >= '2') && (proto[i] <= '4')) {
|
if (structTypes && (proto[i] == '2' || proto[i] == '3' || proto[i] == '4')){
|
||||||
for (unsigned vi = 0, ve = proto[i] - '0'; vi != ve; ++vi) {
|
for (unsigned vi = 0, ve = proto[i] - '0'; vi != ve; ++vi) {
|
||||||
s += args + ".val[" + utostr(vi) + "].val";
|
s += args + ".val[" + utostr(vi) + "].val";
|
||||||
if (explicitcast)
|
|
||||||
s += ")";
|
|
||||||
|
|
||||||
if ((vi + 1) < ve)
|
if ((vi + 1) < ve)
|
||||||
s += ", ";
|
s += ", ";
|
||||||
}
|
}
|
||||||
@ -846,10 +829,10 @@ static std::string GenBuiltin(const std::string &name, const std::string &proto,
|
|||||||
else
|
else
|
||||||
s += args;
|
s += args;
|
||||||
|
|
||||||
if (structTypes && !scal)
|
if (structTypes && proto[i] != 's' && proto[i] != 'i' && proto[i] != 'l' &&
|
||||||
|
proto[i] != 'p' && proto[i] != 'c' && proto[i] != 'a') {
|
||||||
s += ".val";
|
s += ".val";
|
||||||
if (explicitcast)
|
}
|
||||||
s += ")";
|
|
||||||
if ((i + 1) < e)
|
if ((i + 1) < e)
|
||||||
s += ", ";
|
s += ", ";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user