Skip to content

Fix LZCNT returning the BSR result - #216

Open
egorich239 wants to merge 1 commit into
jart:masterfrom
egorich239:lzcnt
Open

egorich239 wants to merge 1 commit into
jart:masterfrom
egorich239:lzcnt

Conversation

@egorich239

Copy link
Copy Markdown

REP BSR is LZCNT, but its helper answered bsr(x), the index of the highest set bit, where the count of zeros above it is wanted. The two helpers were also named the other way round: the one under REP BSF computes tzcnt and was called Lzcnt. They now carry the name of what they compute, and LZCNT answers bits - 1 - bsr(x). Flags are as they were: CF for a zero source, ZF for a zero result.

REP BSR is LZCNT, but its helper answered bsr(x), the index of the
highest set bit, where the count of zeros above it is wanted. The two
helpers were also named the other way round: the one under REP BSF
computes tzcnt and was called Lzcnt. They now carry the name of what
they compute, and LZCNT answers bits - 1 - bsr(x). Flags are as they
were: CF for a zero source, ZF for a zero result.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant