Adds the function drx_expand_scatter_gather() that is capable of expanding AVX-512 scatter and gather and AVX2 gather instructions into equivalent sequences of scalar code.
WARNING: Do not use yet, support is incomplete.
In particular,
- Certain registers may be clobbered by the sequence and will not be restored.
- Application state may not be properly restored if the sequence is getting interrupted.
- drreg may fail if used in other phases in addition to app2app (xref #3823 (closed)).
Furthermore,
- AArch64 support is missing (xref #3837).
- The qword index and value versions are not supported in 32-bit mode.
Adds a limited test for the expanded sequences. The test works with above limitations, because the clobbered registers are not live in the test application and the application does not check the mask state until the instruction is complete. In the test application this may result in occasional duplicated scalar loads and stores, but will not break the test.
Adds a check for the mask registers to test client.avx512ctx.
Issue: #2985 (closed), #3837