Today this is what happens when we encounter hwcaps we cannot handle:

vex: priv/main_main.c:329 (LibVEX_Translate): Assertion
`are_valid_hwcaps(VexArchAMD64, vta->archinfo_host.hwcaps)' failed.

Running with -d offers this much enlightenment:

--7732:1:main     ... arch = AMD64, hwcaps = INVALID

Not a good base for a bug report...

With this change, the user experience will be smoewhat better, e.g.:

VEX: Support for AVX2 requires AVX capabilities
     Found: amd64-cx16-rdtscp-sse3-avx2
Cannot continue. Good-bye

Specifically, the patch decouples showing hwcaps and deciding their validity.
show_hwcaps_<ARCH> reports the hwcaps it finds. It never returns NULL.
check_hwcaps checks the hwcaps for feasibility and does not return in case
VEX cannot deal with them.
The function are_valid_hwcaps no longer exists.


git-svn-id: svn://svn.valgrind.org/vex/trunk@3038 8f6e269a-dfd6-0310-a8e1-e2731360e62c
1 file changed