Skip to content

arm thumb thb instruction shift in Capstone 4 #1317

@disconnect3d

Description

@disconnect3d

Is the difference in TBH arm thumb instruction introduced in capstone 4.0 correct?

On 3.0.5:

$ LD_PRELOAD=../libcapstone.so ./cstool -h | head -n1
Cstool for Capstone Disassembler Engine v3.0.5

$ LD_PRELOAD=../libcapstone.so ./cstool -d thumb "d0 e8 11 f0"
0  d0 e8 11 f0  tbh	[r0, r1, lsl #1]
	op_count: 1
		operands[0].type: MEM
			operands[0].mem.base: REG = r0
			operands[0].mem.index: REG = r1
			Shift: 2 = 1
	Groups: thumb2 jump

On 4.0:

$ ./cstool -h | head -n1
Cstool for Capstone Disassembler Engine v4.0.0

$ ./cstool -d thumb "d0 e8 11 f0"
 0  d0 e8 11 f0  tbh	[r0, r1, lsl #1]
	op_count: 1
		operands[0].type: MEM
			operands[0].mem.base: REG = r0
			operands[0].mem.index: REG = r1
			operands[0].mem.lshift: 0x1
		operands[0].access: READ
	Registers read: r0 r1
	Groups: thumb2 jump

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