Skip to content

ARM decompile appears to ignore high-word in movw / movt pair #8700

@pcjc2

Description

@pcjc2

Describe the bug
A clear and concise description of the bug.

Observed in ARM decompile:

4d f6 f0 movw r1 ,#0xd8f0
01
cf f6 ff movt r1 ,#0xffff
71

r1 is set to -10,000 (decimal).

decompule output

iVar3 = 55536;

(NB: iVar3 is typed int32_t)

Expected behavior
A clear and concise description of what you expected to happen.

Decompile should be:

iVar3 = -10000;

Environment (please complete the following information):

  • OS: [e.g. macOS 10.14.2]
  • Java Version: [e.g. 11.0]
  • Ghidra Version: [e.g. 10.1.4]
  • Ghidra Origin: [e.g. official GitHub distro, third party distro, locally built]

11.4.2_PUBLIC

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions