This patch contains test for reading YMM Registers. The test basically
contains an inferior that loads the ymm registers with a bit pattern
and the python test executes register read to check if the bit pattern
is correctly written in the registers. This test is repeated twice for
each register with a different pattern for better sanity.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
This test fails for me on an older MacPro without AVX instructions (https://everymac.com/systems/apple/mac_pro/specs/mac-pro-twelve-core-2.66-mid-2010-westmere-specs.html) is there a way to restrict this test to run on AVX systems only? E.g., can we restrict it to x86_64h?
Detecting x86_64h might be tricky on different platforms. Two things I can think of: explicitly compile using x86_64h and when you try to run it it might fail. I believe that will work for Darwin, but not sure about other OSs (linux, Android). Mach-o has the x86_64h CPU type/subtyype, but I am not sure how ELF does this since they only really have the machine type and it isn't enough to represent x86_64h. The other way would be to start up the process (if it launches on all platforms) and look for a register by name that is only available if haswell support is available on the system. I believe all of our targets do correctly detect their AVX regs, so just stopping and looking for the register by name, and end the test as an expected failure or success if the register isn't available.