-
Notifications
You must be signed in to change notification settings - Fork 191
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
Branch Instruction in Conditional Block (IT{TTT}) leads to incorrect Graph Dependencies #3976
Comments
nvm, turns out they are shipping illegal assembly. Quoting the manual: [EDIT: This only holds true for ARM instructions, as many (most) thumb instructions cannot encode the condition themselves and rely on |
Actually, although this is spec-conforming, a fall-through edge should still be added. Many disassemblers, including Ghidra and Capstone, disassemble the instruction as |
I think this is merely a consistency check between what the author intends with the I don't think there are fields in the encoding of thumb instructions (except branches) for condition codes, which is why the
It's due to objdump being aware of This all points to you being right: not only should there be an edge between this block and its immediate successor (fall-through execution when the Qemu usermode (qemu-arm) behavior |
Closing this as a duplicate of #1720. |
If a branch instruction is made conditional by a previous IT instruction, the disassembler still treats the branch as unconditional.
This leads to disconnected graphs/functions:
Instead, the branch should be treated as conditional, connecting the following basic block as a fall-through edge.
This bug not only leads to disconnected basic block graphs but also to missed instructions:
Example binary (the behavior is observable in the
Reset_Handler
)The text was updated successfully, but these errors were encountered: