Skip to content

"if-then" disassembled incorrectly for ARM Thumb #1195

@lwerdna

Description

@lwerdna

Instruction word 0xBFF6 should be "itet" but instead is "itte". Here is minimal code to reproduce:

#!/usr/bin/env python
from capstone import *
md = Cs(CS_ARCH_ARM, CS_MODE_BIG_ENDIAN|CS_MODE_THUMB)
for i in md.disasm("\xbf\xf6", 0):
	print("0x%x:\t%s\t%s" %(i.address, i.mnemonic, i.op_str))

Here are the bit fields:

+----+----+-----------+------+
|1011|1111|firstcond.4|mask.4|
+----+----+-----------+------+
|1011|1111|       1111|  0110|
+----+----+-----------+------+

Looking up '0110' in table A8-2 in doc DDI0406C gives the "et" correct answer. Also verified with online disassembler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions