Skip to content

Fix return value from RdSeed_cpuid()#9

Open
blubberdiblub wants to merge 1 commit intostillson:masterfrom
blubberdiblub:master
Open

Fix return value from RdSeed_cpuid()#9
blubberdiblub wants to merge 1 commit intostillson:masterfrom
blubberdiblub:master

Conversation

@blubberdiblub
Copy link

The function returned info[1] (which is the content of the ebx
register) instead of 0 when it detected that rdseed is unavailable.
This is likely a remnant from an earlier iteration of the code.

While it is unlikely that it will show up as bug (all of the bits of
ebx would have to be cleared, except bit #0 which would have to be
set) due to the calling function comparing the return value explicitly
with 1, it's still better to fix it.

The function returned `info[1]` (which is the content of the `ebx`
register) instead of `0` when it detected that _rdseed_ is unavailable.
This is likely a remnant from an earlier iteration of the code.

While it is unlikely that it will show up as bug (all of the bits of
`ebx` would have to be cleared, except bit #0 which would have to be
set) due to the calling function comparing the return value explicitly
with 1, it's still better to fix 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

Successfully merging this pull request may close these issues.

1 participant