capstone icon indicating copy to clipboard operation
capstone copied to clipboard

cs_regs_access doesn't handle ARM64_OP_SYS type

Open busmaker opened this issue 4 years ago • 0 comments

Hi, I just found an issue that cs_regs_access didn't parse mrs x8, tpidr_el0 (bytes: 48 D0 3B D5) correctly, the x8 is destination and tpidr_el0 should be the source, but instead that it parsed x8 as destination and x8 as source.

I took quick glance into cs_regs_access function found it just handle the ARM64_OP_REG and ARM_OP_MEM types, and the tpidr_el0 operand is marked as ARM64_OP_SYS, so it's skipped.

I don't know it's a bug or a feature, or there's another function that I should use for parsing sysmte registers?

thanks for your time.

busmaker avatar May 29 '21 22:05 busmaker