mirror of https://github.com/PCSX2/pcsx2.git
common: add new file in project and fix condition ordering
This commit is contained in:
parent
ed9dbd9fae
commit
d608d97ab7
|
@ -166,6 +166,7 @@
|
|||
<ClInclude Include="..\..\include\Utilities\HashMap.h" />
|
||||
<ClInclude Include="..\..\include\intrin_x86.h" />
|
||||
<ClInclude Include="..\..\include\Utilities\lnx_memzero.h" />
|
||||
<ClInclude Include="..\..\include\Utilities\Math.h" />
|
||||
<ClInclude Include="..\..\include\Utilities\MemcpyFast.h" />
|
||||
<ClInclude Include="..\..\include\Utilities\Path.h" />
|
||||
<ClInclude Include="..\..\src\Utilities\PrecompiledHeader.h" />
|
||||
|
|
|
@ -168,6 +168,9 @@
|
|||
<ClInclude Include="..\..\include\Utilities\lnx_memzero.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\Utilities\Math.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\Utilities\MemcpyFast.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
@ -166,6 +166,7 @@
|
|||
<ClInclude Include="..\..\include\Utilities\HashMap.h" />
|
||||
<ClInclude Include="..\..\include\intrin_x86.h" />
|
||||
<ClInclude Include="..\..\include\Utilities\lnx_memzero.h" />
|
||||
<ClInclude Include="..\..\include\Utilities\Math.h" />
|
||||
<ClInclude Include="..\..\include\Utilities\MemcpyFast.h" />
|
||||
<ClInclude Include="..\..\include\Utilities\Path.h" />
|
||||
<ClInclude Include="..\..\src\Utilities\PrecompiledHeader.h" />
|
||||
|
|
|
@ -168,6 +168,9 @@
|
|||
<ClInclude Include="..\..\include\Utilities\lnx_memzero.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\Utilities\Math.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\Utilities\MemcpyFast.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
@ -21,14 +21,14 @@
|
|||
|
||||
// On GCC >= 4.7, this is equivalent to __builtin_clrsb(n);
|
||||
inline u32 count_leading_sign_bits(s32 n) {
|
||||
// If BSR is used directly, it would have an undefined value for 0.
|
||||
if (n == 0)
|
||||
return 32;
|
||||
|
||||
// If the sign bit is 1, we invert the bits to 0 for count-leading-zero.
|
||||
if (n < 0)
|
||||
n = ~n;
|
||||
|
||||
// If BSR is used directly, it would have an undefined value for 0.
|
||||
if (n == 0)
|
||||
return 32;
|
||||
|
||||
// Perform our count leading zero.
|
||||
#ifdef _MSC_VER
|
||||
unsigned long ret;
|
||||
|
|
Loading…
Reference in New Issue