Bug 494162

Summary: adx flag not set in cpuid, but adox/adcx insns work
Product: [Developer tools] valgrind Reporter: Joe Pixton <jpixton>
Component: vexAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 3.22.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Joe Pixton 2024-10-05 10:35:50 UTC
SUMMARY
valgrind appears to correctly support instructions under the ADX CPUID flag (adcx, adox), however the ADX flag appears to be masked from CPUID.

STEPS TO REPRODUCE
```
$ git clone https://github.com/ctz/x86utils
$ cd x86utils
$ make

# baseline  for host
$ ./test | grep features-5
features-5: AVX512VL AVX512BW SHA AVX512CD CLWB CLFLUSHOPT AVX512IFMA SMAP ADX RDSEED AVX512DQ AVX512F PQE PQM INVPCID ERMS BMI2 SMEP AVX2 BMI1 FSGSBase 
```

OBSERVED RESULT
```
$ valgrind -q ./test | grep features-5
features-5: RDSEED xFPUCS INVPCID ERMS BMI2 SMEP AVX2 BMI1 TSCAdjust 
```

EXPECTED RESULT
```
$ valgrind -q ./test | grep features-5
features-5: ADX RDSEED xFPUCS INVPCID ERMS BMI2 SMEP AVX2 BMI1 TSCAdjust 
```

SOFTWARE/OS VERSIONS
This is valgrind-3.22.0 as packaged by Ubuntu 24.04 (3.22.0-0ubuntu3), on x86_64.