[patch #8730] Fixes for AX_EXT / AX_GCC_X86_AVX_XGETBV / AX_GCC_X86_CPUID

Michael Petch <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.archive-maintainers
Message-ID <[email protected]>
URL:
  <http://savannah.gnu.org/patch/?8730>

                 Summary: Fixes for AX_EXT / AX_GCC_X86_AVX_XGETBV /
AX_GCC_X86_CPUID
                 Project: GNU Autoconf Archive
            Submitted by: mdpetch
            Submitted on: Wed 26 Aug 2015 18:50:41 MDT
                Priority: 7 - High
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

An issue was discovered when CPUID was 0x07. the returned values
(eax,ebx,ecx,edx) always returned 0 even on newer processors. Some of the
CPUID categories (including 0x07) now require ECX to be set with a count value
prior to executing CPUID.

Resolved this (and other cleanup) by adding a new function
AX_GCC_X86_CPUID_COUNT(OP, COUNT); modify AX_EXT to call this new function;
and explicitly set ECX to 0 when someone calls AX_GCC_X86_CPUID; make sure
that all the __asm__ instructions include __volatile__ to be on the safe
side.

The included patch can be applied to the latest versions in git.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 26 Aug 2015 18:50:41 MDT  Name: ax_ext_related_fixes.patch  Size:
5kB   By: mdpetch
Patch to resolve a CPUID category of 0x07 + cleanup
<http://savannah.gnu.org/patch/download.php?file_id=34749>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8730>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.