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

The condition field is not emulated correctly in 32-bit mode (Aarch32) #9

Open
julienfreche opened this issue Nov 9, 2020 · 0 comments

Comments

@julienfreche
Copy link
Contributor

I came across an interesting case today. It seems like “__currentCond” is never set in the ARM model.
This is useful when executing 32-bit instructions that are conditional. In theory, for A32, it should contain the higher bits of the current instruction (28 to 31). But, it is never set in the model.

As a result, the condition attached to an instruction will not be emulated properly. The fix should be to include this in the decoding step. Probably something as simple as: __currentCond = __currentInst[31 .. 28] is a good start (probably not for Thumb though)

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

1 participant