Adds 64-bit mode support for copying the AVX-512 state components to and from signal frames. In order to know the offsets, like the kernel, we query cpuid for the state component's offset in the extended xsave area region. No measures have been taken in terms of lazy context copying since no AVX-512 instructions are introduced. Instead, we stick to the process's xsave configuration.
It is unclear what the kernel does in 32-bit mode. The cpuid offsets seem to be invalid for the AVX-512 state components in 32-bit. DynamoRIO does not copy the state in 32-bit mode yet.
The test linux.sigcontext has been extended to testing AVX-512 state in 64-bit mode.
Fixes incorrect XCR0 bit position definitions introduced in 6ff52d9d.
Fixes a latent bug, setting the right user state components when executing xsave/xsave64. It also adds a comment explaining how the current kernel behavior of filling in state as part of the extended xsave area in signal frames in 32-bit mode is unclear and needs more work or at least an explicit explanation that those components are not populated.
Removes multiple stale XXX i#1312 comments.
Starting with this patch, DynamoRIO has experimental support for running full 64-bit unix AVX-512 applications and we encourage users to file issues, should any be discovered. 32-bit mode AVX-512 state components in signal frames and some context managing parts in Windows and MacOS in general are not yet supported. Certain client API like instr_compute_address_ex() is not yet fully supported for AVX-512 on any system. AVX-512 opcode values are expected to be stable but clients should refrain from relying on binary compatibility in this regard until issue i#1312 has been closed.
Issue: #1312