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

Condition will always be false. #94

Open
alf-p-steinbach opened this issue Jan 6, 2020 · 2 comments
Open

Condition will always be false. #94

alf-p-steinbach opened this issue Jan 6, 2020 · 2 comments
Assignees
Labels
bug Something isn't working help-wanted This issue / or pull request is up for grabs for anyone in the community to help.

Comments

@alf-p-steinbach
Copy link

if ((instruction & 0xFE70F000) == 0xF81FF000) {

@bgianfo bgianfo added the bug Something isn't working label Aug 21, 2020
@bgianfo bgianfo self-assigned this Aug 21, 2020
@bgianfo
Copy link
Contributor

bgianfo commented Aug 21, 2020

Thanks for the report, I'll take a look!

@bgianfo bgianfo added Hacktoberfest help-wanted This issue / or pull request is up for grabs for anyone in the community to help. labels Aug 28, 2020
@frerich
Copy link
Contributor

frerich commented Sep 3, 2020

Assuming that the comment

        // 1111100xx001xxxx1111xxxxxxxxxxxx : PLD, PLI

is accurate, the bit mask (0xFE70F000) is correct -- but the expected value should be 0xF810F000. I.e. the lowest byte of the upper 32bit should be zero. The comment shows that this byte is not relevant (xxxx) and thus it makes sense to mask it out -- but then we'd expect all zeroes in the result.

Maybe this is a small brain fault since a few lines below, a slightly different mask is used, 0xFE7FF000 and in that case, the expected value would indeed by 0xF81FF000.

I suspect a unit test for this disassembler bug should be straightforward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help-wanted This issue / or pull request is up for grabs for anyone in the community to help.
Projects
None yet
Development

No branches or pull requests

3 participants