Skip to content

aarch64: prefer to show shift value for long immediates #2890

@hainest

Description

@hainest

It would be nice if the aarch64 pretty printer showed large immediates as shift values (where appropriate) instead of hex values. This, of course, is purely optional but the ARM standard suggests it.

bytes (little endian): 0xe402a012

Tool output
cstool -dar mov w4, #-0x170001
cstool -daru mov w4, #0xffffffffffe8ffff
binutils mov w4, #0xffe8ffff
disarm movn w4, #0x17, lsl #16

There is no correctness issue in Capstone here. It would just be a nice QoI improvement.


From the docs:

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions