DynamoRIO / dynamorio

Dynamic Instrumentation Tool Platform
Other
2.67k stars 562 forks source link

AArch64: Fix P register save/restore on 128-bit vector length systems #6760

Closed AssadHashmi closed 7 months ago

AssadHashmi commented 7 months ago

Currently predicate and FFR state is stored in dr_simd_t. This wastes space as predicates and FFR are an 1/8th of the size of the implementation's scalable vector register length.

Issue raised during review of https://github.com/DynamoRIO/dynamorio/pull/6757.

SVE master issue https://github.com/DynamoRIO/dynamorio/issues/5365.

jackgallagher-arm commented 7 months ago

It turns out that #6757 broke slot save/restore on systems with 128-bit vector length because sizeof(dr_simd_t)*8 is out of range for Pn register ldr/str instructions (see #6774 for details) so this is a bug fix in addition to saving space.