Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#5365 AArch64: Fix tests on non 256-bit VL hardware
Some of the SVE tests are written assuming a 256-bit vector length so that we get consistent output from the codec regardless of the hardware vector length that the test is run on. This was previously acheived by hard coding DynamoRIO's vector length to 256-bits when built with BUILD_TESTS=1. This worked fine for the codec tests (api.ir_sve, api.dis-a64-sve) but this breaks tests such as client.drx-scattergather which need the vector length to match the hardware. This patch tweaks two things so that all tests should now work on all vector lengths: 1. get_processor_specific_info() now initializes the vector length to the correct hardware value whether or not BUILD_TESTS=1. This enables the client tests to work on all vector lengths. 2. The AArch64 codec now uses dr_get_sve_vector_length() to get the vector length when built with BUILT_TESTS=1. This allows the api tests to override the vector length used by the codec by calling dr_set_sve_vector_length(). The api tests already call enable_all_test_cpu_features() which itself calls dr_set_sve_vector_length(256) so no changes to the tests themselves were needed. Issue: #5365
- Loading branch information