Commit 24f454e2 by Alexis Hetu Committed by Alexis Hétu

Renaming functions named after operator names

Windows clang has no option to do anything similar to "-fno-operator-names", so it generates errors without any way to silence them. Renaming these functions is easy enough, so it was done here. Also removed the now useless flag from the code blocks project files. Change-Id: I9e25e25a72bf24567e3be928e07b187df87398bc Reviewed-on: https://swiftshader-review.googlesource.com/7051Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 03b67af4
...@@ -113,7 +113,6 @@ ...@@ -113,7 +113,6 @@
<Add option="-Wall" /> <Add option="-Wall" />
<Add option="-std=c++11" /> <Add option="-std=c++11" />
<Add option="-fexceptions" /> <Add option="-fexceptions" />
<Add option="-fno-operator-names" />
<Add option="-msse2" /> <Add option="-msse2" />
<Add option="-fvisibility=protected" /> <Add option="-fvisibility=protected" />
<Add option="-D__STDC_LIMIT_MACROS" /> <Add option="-D__STDC_LIMIT_MACROS" />
......
...@@ -113,7 +113,6 @@ ...@@ -113,7 +113,6 @@
<Add option="-Wall" /> <Add option="-Wall" />
<Add option="-std=c++11" /> <Add option="-std=c++11" />
<Add option="-fexceptions" /> <Add option="-fexceptions" />
<Add option="-fno-operator-names" />
<Add option="-msse2" /> <Add option="-msse2" />
<Add option="-fvisibility=protected" /> <Add option="-fvisibility=protected" />
<Add option="-D__STDC_LIMIT_MACROS" /> <Add option="-D__STDC_LIMIT_MACROS" />
......
...@@ -320,10 +320,10 @@ namespace sw ...@@ -320,10 +320,10 @@ namespace sw
case Shader::OPCODE_CMP: cmp(d, s0, s1, control); break; case Shader::OPCODE_CMP: cmp(d, s0, s1, control); break;
case Shader::OPCODE_ALL: all(d.x, s0); break; case Shader::OPCODE_ALL: all(d.x, s0); break;
case Shader::OPCODE_ANY: any(d.x, s0); break; case Shader::OPCODE_ANY: any(d.x, s0); break;
case Shader::OPCODE_NOT: not(d, s0); break; case Shader::OPCODE_NOT: bitwise_not(d, s0); break;
case Shader::OPCODE_OR: or(d, s0, s1); break; case Shader::OPCODE_OR: bitwise_or(d, s0, s1); break;
case Shader::OPCODE_XOR: xor(d, s0, s1); break; case Shader::OPCODE_XOR: bitwise_xor(d, s0, s1); break;
case Shader::OPCODE_AND: and(d, s0, s1); break; case Shader::OPCODE_AND: bitwise_and(d, s0, s1); break;
case Shader::OPCODE_EQ: equal(d, s0, s1); break; case Shader::OPCODE_EQ: equal(d, s0, s1); break;
case Shader::OPCODE_NE: notEqual(d, s0, s1); break; case Shader::OPCODE_NE: notEqual(d, s0, s1); break;
case Shader::OPCODE_END: break; case Shader::OPCODE_END: break;
......
...@@ -1777,7 +1777,7 @@ namespace sw ...@@ -1777,7 +1777,7 @@ namespace sw
dst = As<Float4>(As<Int4>(src.x) | As<Int4>(src.y) | As<Int4>(src.z) | As<Int4>(src.w)); dst = As<Float4>(As<Int4>(src.x) | As<Int4>(src.y) | As<Int4>(src.z) | As<Int4>(src.w));
} }
void ShaderCore::not(Vector4f &dst, const Vector4f &src) void ShaderCore::bitwise_not(Vector4f &dst, const Vector4f &src)
{ {
dst.x = As<Float4>(As<Int4>(src.x) ^ Int4(0xFFFFFFFF)); dst.x = As<Float4>(As<Int4>(src.x) ^ Int4(0xFFFFFFFF));
dst.y = As<Float4>(As<Int4>(src.y) ^ Int4(0xFFFFFFFF)); dst.y = As<Float4>(As<Int4>(src.y) ^ Int4(0xFFFFFFFF));
...@@ -1785,7 +1785,7 @@ namespace sw ...@@ -1785,7 +1785,7 @@ namespace sw
dst.w = As<Float4>(As<Int4>(src.w) ^ Int4(0xFFFFFFFF)); dst.w = As<Float4>(As<Int4>(src.w) ^ Int4(0xFFFFFFFF));
} }
void ShaderCore::or(Vector4f &dst, const Vector4f &src0, const Vector4f &src1) void ShaderCore::bitwise_or(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
{ {
dst.x = As<Float4>(As<Int4>(src0.x) | As<Int4>(src1.x)); dst.x = As<Float4>(As<Int4>(src0.x) | As<Int4>(src1.x));
dst.y = As<Float4>(As<Int4>(src0.y) | As<Int4>(src1.y)); dst.y = As<Float4>(As<Int4>(src0.y) | As<Int4>(src1.y));
...@@ -1793,7 +1793,7 @@ namespace sw ...@@ -1793,7 +1793,7 @@ namespace sw
dst.w = As<Float4>(As<Int4>(src0.w) | As<Int4>(src1.w)); dst.w = As<Float4>(As<Int4>(src0.w) | As<Int4>(src1.w));
} }
void ShaderCore::xor(Vector4f &dst, const Vector4f &src0, const Vector4f &src1) void ShaderCore::bitwise_xor(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
{ {
dst.x = As<Float4>(As<Int4>(src0.x) ^ As<Int4>(src1.x)); dst.x = As<Float4>(As<Int4>(src0.x) ^ As<Int4>(src1.x));
dst.y = As<Float4>(As<Int4>(src0.y) ^ As<Int4>(src1.y)); dst.y = As<Float4>(As<Int4>(src0.y) ^ As<Int4>(src1.y));
...@@ -1801,7 +1801,7 @@ namespace sw ...@@ -1801,7 +1801,7 @@ namespace sw
dst.w = As<Float4>(As<Int4>(src0.w) ^ As<Int4>(src1.w)); dst.w = As<Float4>(As<Int4>(src0.w) ^ As<Int4>(src1.w));
} }
void ShaderCore::and(Vector4f &dst, const Vector4f &src0, const Vector4f &src1) void ShaderCore::bitwise_and(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
{ {
dst.x = As<Float4>(As<Int4>(src0.x) & As<Int4>(src1.x)); dst.x = As<Float4>(As<Int4>(src0.x) & As<Int4>(src1.x));
dst.y = As<Float4>(As<Int4>(src0.y) & As<Int4>(src1.y)); dst.y = As<Float4>(As<Int4>(src0.y) & As<Int4>(src1.y));
......
...@@ -343,10 +343,10 @@ namespace sw ...@@ -343,10 +343,10 @@ namespace sw
void insert(Vector4f &dst, const Vector4f &src, const Float4 &element, const Float4 &index); void insert(Vector4f &dst, const Vector4f &src, const Float4 &element, const Float4 &index);
void all(Float4 &dst, const Vector4f &src); void all(Float4 &dst, const Vector4f &src);
void any(Float4 &dst, const Vector4f &src); void any(Float4 &dst, const Vector4f &src);
void not(Vector4f &dst, const Vector4f &src); void bitwise_not(Vector4f &dst, const Vector4f &src);
void or(Vector4f &dst, const Vector4f &src0, const Vector4f &src1); void bitwise_or(Vector4f &dst, const Vector4f &src0, const Vector4f &src1);
void xor(Vector4f &dst, const Vector4f &src0, const Vector4f &src1); void bitwise_xor(Vector4f &dst, const Vector4f &src0, const Vector4f &src1);
void and(Vector4f &dst, const Vector4f &src0, const Vector4f &src1); void bitwise_and(Vector4f &dst, const Vector4f &src0, const Vector4f &src1);
void equal(Vector4f &dst, const Vector4f &src0, const Vector4f &src1); void equal(Vector4f &dst, const Vector4f &src0, const Vector4f &src1);
void notEqual(Vector4f &dst, const Vector4f &src0, const Vector4f &src1); void notEqual(Vector4f &dst, const Vector4f &src0, const Vector4f &src1);
......
...@@ -314,10 +314,10 @@ namespace sw ...@@ -314,10 +314,10 @@ namespace sw
case Shader::OPCODE_INSERT: insert(d, s0, s1.x, s2.x); break; case Shader::OPCODE_INSERT: insert(d, s0, s1.x, s2.x); break;
case Shader::OPCODE_ALL: all(d.x, s0); break; case Shader::OPCODE_ALL: all(d.x, s0); break;
case Shader::OPCODE_ANY: any(d.x, s0); break; case Shader::OPCODE_ANY: any(d.x, s0); break;
case Shader::OPCODE_NOT: not(d, s0); break; case Shader::OPCODE_NOT: bitwise_not(d, s0); break;
case Shader::OPCODE_OR: or(d, s0, s1); break; case Shader::OPCODE_OR: bitwise_or(d, s0, s1); break;
case Shader::OPCODE_XOR: xor(d, s0, s1); break; case Shader::OPCODE_XOR: bitwise_xor(d, s0, s1); break;
case Shader::OPCODE_AND: and(d, s0, s1); break; case Shader::OPCODE_AND: bitwise_and(d, s0, s1); break;
case Shader::OPCODE_EQ: equal(d, s0, s1); break; case Shader::OPCODE_EQ: equal(d, s0, s1); break;
case Shader::OPCODE_NE: notEqual(d, s0, s1); break; case Shader::OPCODE_NE: notEqual(d, s0, s1); break;
case Shader::OPCODE_TEXLDL: TEXLDL(d, s0, src1); break; case Shader::OPCODE_TEXLDL: TEXLDL(d, s0, src1); break;
......
...@@ -89,7 +89,6 @@ ...@@ -89,7 +89,6 @@
<Add option="-Wall" /> <Add option="-Wall" />
<Add option="-std=c++11" /> <Add option="-std=c++11" />
<Add option="-fexceptions" /> <Add option="-fexceptions" />
<Add option="-fno-operator-names" />
<Add option="-msse2" /> <Add option="-msse2" />
<Add option="-D__STDC_LIMIT_MACROS" /> <Add option="-D__STDC_LIMIT_MACROS" />
<Add option="-D__STDC_CONSTANT_MACROS" /> <Add option="-D__STDC_CONSTANT_MACROS" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment