DynamoRIO / DynamoRIO/dynamorio

AArch64: `dr_get_mcontext()` and `dr_set_mcontext()` do not handle `fpcr` and `fpsr` registers.

Open
#5,595 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

As discussed in a [RISC-V related pull request](https://github.com/DynamoRIO/dynamorio/pull/5588#discussion_r938212368), none of the `dr_mcontext_flags_t` flags cause the floating point control and status registers to be saved/restored.
I have a similar case where RISC-V has a floating point control and status register without having a condition flags register (all conditional branches perform arithmetic comparisons as part of the instruction).

In both AArch64 and RISC-V case the floating point registers should be handled for `dr_get_mcontext()` and `dr_set_mcontext()`. The question is which flag should they fall into? Perhaps `DR_MC_CONTROL` fits the picture best?

Or perhaps there is some reason behind this lack of register save/restore that I'm missing?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.