DynamoRIO / DynamoRIO/dynamorio

AArch64: V28 register mismangled as the stolen X28 register

Open
#3,176 1 comment 0 reactions 0 assignees View on GitHub
good first issue help wanted OpSys-AArch64
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 18h
Merged PRs (30d)
30

Description

It seems the `instr_uses_reg(instr, dr_reg_stolen)` is not returning the correct result for instructions that use SIMD registers. Presumably there is a bug in the decoder.

As a result, I've found the unessessary mangles in the DynamoRIO AArch64 7.0.0-RC1 release:

```
fmov d28, d12
```
is manged to
```
str x1, [x28,#8]
mov x1, x28
ldr x28, [x28,#48]
fmov d28, d12
str x28, [x1,#48]
mov x28, x1
ldr x1, [x28,#8]
```

Contributor guide

Open the contributing guide

Research direction

Start with instr_uses_reg(instr, dr_reg_stolen) and the AArch64 decoder, reproducing the reported fmov d28, d12 case from the issue. Trace how SIMD register operands are identified and verify that V28 is not treated as the stolen X28 register; done means the unnecessary mangling is absent and the register-use result is correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.