Skip to content

Shift is shown on the wrong operand on ARM #602

Closed
@mkravchik

Description

@mkravchik

Hi,

Maybe it is my misunderstanding, but it looks that capstone is showing the shift on the wrong operand. Here's the ARM (Thumb) code to test (the rest is the existing test_arm.py):

MY_CODE = "5bf82530".decode("hex")

all_tests = (
(CS_ARCH_ARM, CS_MODE_THUMB, MY_CODE, "My Thumb", None),
)
Here's what I get:

Code: 0x5b 0xf8 0x25 0x30
Disasm:
0x1000: ldr.w r3, [fp, r5, lsl #2]
op_count: 2
operands[0].type: REG = r3
Shift: 2 = 2
operands[1].type: MEM
operands[1].mem.base: REG = fp
operands[1].mem.index: REG = r5
I would expect the shift to appear on the second operand.
Regards,
Moshe

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