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

thumb: incorrect S bit (setflags == !InITBlock()) #13

Open
pistol opened this issue Oct 17, 2013 · 0 comments
Open

thumb: incorrect S bit (setflags == !InITBlock()) #13

pistol opened this issue Oct 17, 2013 · 0 comments

Comments

@pistol
Copy link
Contributor

pistol commented Oct 17, 2013

Example:

>>> darm.disasm_thumb(0x18cc).__str__()
'add r4, r1, r3'
>>> darm.disasm_thumb(0x18cc)
Darm(instr=I_ADD, instr_type=T_THUMB_3REG, cond=C_AL, Rd=r4, Rn=r1, Rm=r3, rotate=0)

objdump reports this instead as adds (S bit set).

Unlike for A32, S bit is determined by setflags == !InITBlock() according to A.8.8.4 T1.

The caller is responsible for knowing InITBlock().

darm should expose S as one of B_INVLD, B_SET, B_UNSET, B_IT where B_IT is a new state, signaling the caller of the special check required.

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