[Lldb-commits] [PATCH] D41962: Fix TestYMMRegisters for older machines without AVX2

2018-01-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In https://reviews.llvm.org/D41962#975168, @aprantl wrote: > > there's a new skipUnlessFeature() method added to decorators.py which runs > > sysctl to detect hardware features (in this case, hw.optional.avx512f) > > How does one execute a program like `sysctl` on t

[Lldb-commits] [PATCH] D41962: Fix TestYMMRegisters for older machines without AVX2

2018-01-12 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added a comment. > there's a new skipUnlessFeature() method added to decorators.py which runs > sysctl to detect hardware features (in this case, hw.optional.avx512f) How does one execute a program like `sysctl` on the remote? I have seen code in TestLldbGdbServer.py that uses `platform

[Lldb-commits] [PATCH] D41962: Fix TestYMMRegisters for older machines without AVX2

2018-01-12 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added a comment. > Why not just look for the AVX registers by name that are only available if > they are correctly detected by the native lldb-server or debugserver? Then we > can avoid all of this. If we don't execute any instructions that crash the > program, we can stop before any sp

Re: [Lldb-commits] [PATCH] D41962: Fix TestYMMRegisters for older machines without AVX2

2018-01-12 Thread Greg Clayton via lldb-commits
Why not just look for the AVX registers by name that are only available if they are correctly detected by the native lldb-server or debugserver? Then we can avoid all of this. If we don't execute any instructions that crash the program, we can stop before any specialized AVX instructions are exe

[Lldb-commits] [PATCH] D41962: Fix TestYMMRegisters for older machines without AVX2

2018-01-12 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl updated this revision to Diff 129639. aprantl added a comment. Uploaded a mildly better version that is NFC on MSVC. https://reviews.llvm.org/D41962 Files: packages/Python/lldbsuite/test/functionalities/register/intel_avx/TestYMMRegister.py packages/Python/lldbsuite/test/functional

[Lldb-commits] [PATCH] D41962: Fix TestYMMRegisters for older machines without AVX2

2018-01-12 Thread Craig Topper via Phabricator via lldb-commits
craig.topper added a comment. __builtin_cpu_init was added to clang between 5.0 and 6.0 https://reviews.llvm.org/D41962 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D41962: Fix TestYMMRegisters for older machines without AVX2

2018-01-12 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added a comment. In https://reviews.llvm.org/D41962#974656, @jasonmolenda wrote: > I suppose a possible alternative would be to figure out the avx2 / avx512 > features manually based on the cpuid instead of letting the compiler do it > for us. e.g. > https://stackoverflow.com/question

[Lldb-commits] [PATCH] D41962: Fix TestYMMRegisters for older machines without AVX2

2018-01-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. I suppose a possible alternative would be to figure out the avx2 / avx512 features manually based on the cpuid instead of letting the compiler do it for us. e.g. https://stackoverflow.com/questions/1666093/cpuid-implementations-in-c and then checking the bits as

[Lldb-commits] [PATCH] D41962: Fix TestYMMRegisters for older machines without AVX2

2018-01-12 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. fwiw I'm working on upstreaming on zmm (avx512) patches that we have locally (there's one testsuite fail I still need to find time to fix) and the TestZMMRegister.py test that ChrisB wrote to test this is written as skip-unless-darwin, and there's a new skipUnlessF

[Lldb-commits] [PATCH] D41962: Fix TestYMMRegisters for older machines without AVX2

2018-01-12 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In https://reviews.llvm.org/D41962#973827, @craig.topper wrote: > I don't know what platforms this needs to support. But __builtin_cpu_support > only works when compiled with clang or gcc. And it requires compiler-rt or > libgcc. I don't know if that's guaranteed to exis

[Lldb-commits] [PATCH] D41962: Fix TestYMMRegisters for older machines without AVX2

2018-01-11 Thread Craig Topper via Phabricator via lldb-commits
craig.topper added a comment. I don't know what platforms this needs to support. But __builtin_cpu_support only works when compiled with clang or gcc. And it requires compiler-rt or libgcc. I don't know if that's guaranteed to exist on Windows. Repository: rL LLVM https://reviews.llvm.org/D

[Lldb-commits] [PATCH] D41962: Fix TestYMMRegisters for older machines without AVX2

2018-01-11 Thread Roman Lebedev via Phabricator via lldb-commits
lebedev.ri added inline comments. Comment at: packages/Python/lldbsuite/test/functionalities/register/intel_avx/main.c:21 + static volatile unsigned haveAVX2; + haveAVX2 = __builtin_cpu_supports("avx2"); unsigned int ymmallones = 0x; Note that you n

[Lldb-commits] [PATCH] D41962: Fix TestYMMRegisters for older machines without AVX2

2018-01-11 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl created this revision. aprantl added reviewers: jasonmolenda, jingham. Herald added a subscriber: llvm-commits. I found a cheap and cross-platform way of detecting whether the target supports AVX2. Repository: rL LLVM https://reviews.llvm.org/D41962 Files: packages/Python/lldbsui