Skip to content

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

@pistol

Description

@pistol

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions