Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows versions of clz #22

Open
numo68 opened this issue Aug 17, 2016 · 1 comment
Open

Windows versions of clz #22

numo68 opened this issue Aug 17, 2016 · 1 comment

Comments

@numo68
Copy link

numo68 commented Aug 17, 2016

I am trying to compile the code under Windows. After some tweaks it compiles, but the test accesses invalid memory - the
wheel = timeout_wheel(rem);
called with rem = 90 returns 4, with WHEEL_NUM == 4.

I think that the culprit is the implementation of clz32/64 function. This should mean "count leading zeros"; however, the _BitScanReverse finds a position of the most significant true bit. For a value 90 this is 6; it should however return 25. Changing the functions to return 31 - zeros and return 63 - zeros seems to fix this issue.

There is still some other problem - the test using {{{cfg3}}} does not seem to progress, still hunting this one.

@Kiddinglife
Copy link

I got the same problems. Mate.
Did you resolve it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants