-
Notifications
You must be signed in to change notification settings - Fork 888
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
cxxrtl: Fix ctlz
, udivmod
#4067
Conversation
Ping @merryhime, I cannot formally request review but I am requesting review |
Huh, tests still stuck? |
|
Now, hopefully? |
9c0579a
to
18d1907
Compare
divisor = divisor.shl(value<Bits>{divisor_shift}); | ||
int64_t divisor_shift = divisor.ctlz() - dividend.ctlz(); | ||
assert(divisor_shift >= 0); | ||
divisor = divisor.shl(value<Bits>{(chunk::type) divisor_shift}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force pushed to make this cast to chunk::type
instead of unsigned int
OK, there's the usual fluke CI failure on macOS but other than that the hang is no more. |
@povik Thanks for handling this! |
@whitequark Will you be able to review this today? If not we might need to revert #4061 to unblock CI. |
I tried to fix
ctlz
and give it the usual semantics, then adjusted thedivisor_shift
calculation inudivmod
appropriately.