Skip to content

Commit

Permalink
change clz_tab array length to 129 to match GMP
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianGladman committed Aug 1, 2016
1 parent 37e9081 commit 171de8d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ postbuild "$(TargetPath)" 14
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\build.vc/vsyasm.targets" />
<Import Project="..\..\build.vc\vsyasm.targets" />
</ImportGroup>
<ItemGroup>
<None Include="..\..\gmp-h.in" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ postbuild "$(TargetPath)" 14
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\build.vc/vsyasm.targets" />
<Import Project="..\..\build.vc\vsyasm.targets" />
</ImportGroup>
<ItemGroup>
<None Include="..\..\gmp-h.in" />
Expand Down
2 changes: 1 addition & 1 deletion build.vc14/mpir.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_mpir_k8", "lib_mpir_k8\lib_mpir_k8.vcxproj", "{22D14BC4-ADC6-48C6-8BA1-4AC45799B945}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion longlong_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ extern UWtype mpn_udiv_qrnnd_r _PROTO ((UWtype, UWtype, UWtype, UWtype *));
#endif

#ifdef COUNT_LEADING_ZEROS_NEED_CLZ_TAB
extern const unsigned char __GMP_DECLSPEC __clz_tab[128];
extern const unsigned char __GMP_DECLSPEC __clz_tab[129];
#endif

#if !defined (count_trailing_zeros)
Expand Down
5 changes: 3 additions & 2 deletions mp_clz_tab.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ MA 02110-1301, USA. */

#ifdef COUNT_LEADING_ZEROS_NEED_CLZ_TAB
const
unsigned char __clz_tab[128] =
unsigned char __clz_tab[129] =
{
1,2,3,3,4,4,4,4,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
9
};
#endif

0 comments on commit 171de8d

Please sign in to comment.