Page MenuHomePhabricator

Test for YMMRegisters.
ClosedPublic

Authored by ravitheja on Nov 2 2016, 6:03 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

ravitheja updated this revision to Diff 76697.Nov 2 2016, 6:03 AM
ravitheja retitled this revision from to Test for YMMRegisters..
ravitheja updated this object.
clayborg accepted this revision.Nov 2 2016, 8:50 AM
clayborg edited edge metadata.
This revision is now accepted and ready to land.Nov 2 2016, 8:50 AM
This revision was automatically updated to reflect the committed changes.
aprantl added a subscriber: aprantl.Jan 5 2018, 4:57 PM

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.