DynamoRIO / dynamorio

Dynamic Instrumentation Tool Platform
Other
2.61k stars 554 forks source link

i#6585: Add drcachesim vector length trace marker #6603

Closed jackgallagher-arm closed 7 months ago

jackgallagher-arm commented 7 months ago

Adds a new trace marker TRACE_MARKER_TYPE_DYNAMIC_VECTOR_LENGTH to drcachesim that indicates the current vector length for architectures which have a dynamic vector length that can't be statically determined from the instruction.

The marker is emitted as part of the thread header when running on AArch64 with SVE support, but in the future could also be used to track changes in the vector length after prctl(PR_SVE_SET_VL, ..) system calls (i#6625).

Some SVE load and store instructions such as LDR <Zt>, [<Xn|SP>{, #<imm>, MUL VL}] or ST1D { <Zt>.D }, <Pg>, [<Xn|SP>{, #<imm>, MUL VL}]

scale the immediate offset based on the hardware vector length so knowing the correct vector length for the traced application is important to properly decode and analyse these instructions.

Fixes: #6585 Issues: #6625