|
From: | Michael Petch |
Subject: | [patch #8084] av_ext's AVX check doesn't determine if OS actually supports AVX |
Date: | Thu, 20 Jun 2013 20:37:25 +0000 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.44 Safari/537.36 |
URL: <http://savannah.gnu.org/patch/?8084> Summary: av_ext's AVX check doesn't determine if OS actually supports AVX Project: GNU Autoconf Archive Submitted by: mdpetch Submitted on: Thu 20 Jun 2013 14:37:24 MDT Priority: 5 - Normal Status: None Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: Per the Intel documentation (see section 13.8.1): http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.pdf ) and http://software.intel.com/en-us/blogs/2011/04/14/is-avx-enabled ax_ext.m4 checks for different SIMD variants on a CPU. It checks for AVX, but doesn't (IMHO) go far enough to actually be useful in some cases. It is possible to be on a CPU with AVX support and the OS doesn't support it. We should be checking that such support exists. This is via an additional check of cpuinfo's ECX register bit 27. Then one needs to call xgetbv and if EAX&0b110 = 0b110 then AVX is supported by the CPU and OS. Attached is a patch to ax_ext.m4 and a new support file ax_gcc_x86_avx_xgetbv.m4 _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Thu 20 Jun 2013 14:37:24 MDT Name: ax_ext.patch Size: 2kB By: mdpetch <http://savannah.gnu.org/patch/download.php?file_id=28365> ------------------------------------------------------- Date: Thu 20 Jun 2013 14:37:24 MDT Name: ax_gcc_x86_avx_xgetbv.m4 Size: 3kB By: mdpetch <http://savannah.gnu.org/patch/download.php?file_id=28366> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/patch/?8084> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |