mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-09 19:00:08 +00:00
Fix AVX check
This commit is contained in:
parent
a65c0b7a32
commit
1d002f2539
@ -1,3 +1,9 @@
|
|||||||
|
2011-07-21 Andreas Schwab <schwab@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Fix last
|
||||||
|
change.
|
||||||
|
(_dl_x86_64_save_sse): Use correct AVX check.
|
||||||
|
|
||||||
2011-07-21 Ulrich Drepper <drepper@gmail.com>
|
2011-07-21 Ulrich Drepper <drepper@gmail.com>
|
||||||
|
|
||||||
* string/tester.c (test_strcat): Add tests for different alignments
|
* string/tester.c (test_strcat): Add tests for different alignments
|
||||||
|
@ -150,7 +150,8 @@ L(have_avx):
|
|||||||
cmpl $0x6, %eax
|
cmpl $0x6, %eax
|
||||||
// Nonzero if SSE and AVX state saving is enabled.
|
// Nonzero if SSE and AVX state saving is enabled.
|
||||||
sete %al
|
sete %al
|
||||||
2: movl %eax, L(have_avx)(%rip)
|
2: leal -1(%eax,%eax), %eax
|
||||||
|
movl %eax, L(have_avx)(%rip)
|
||||||
cmpl $0, %eax
|
cmpl $0, %eax
|
||||||
|
|
||||||
1: js L(no_avx)
|
1: js L(no_avx)
|
||||||
@ -183,11 +184,19 @@ _dl_x86_64_save_sse:
|
|||||||
movl $1, %eax
|
movl $1, %eax
|
||||||
cpuid
|
cpuid
|
||||||
movq %r11,%rbx # Restore rbx
|
movq %r11,%rbx # Restore rbx
|
||||||
movl $1, %eax
|
xorl %eax, %eax
|
||||||
testl $(1 << 28), %ecx
|
// AVX and XSAVE supported?
|
||||||
jne 2f
|
testl $((1 << 28) | (1 << 27)), %ecx
|
||||||
negl %eax
|
je 2f
|
||||||
2: movl %eax, L(have_avx)(%rip)
|
xorl %ecx, %ecx
|
||||||
|
// Get XFEATURE_ENABLED_MASK
|
||||||
|
xgetbv
|
||||||
|
andl $0x6, %eax
|
||||||
|
cmpl $0x6, %eax
|
||||||
|
// Nonzero if SSE and AVX state saving is enabled.
|
||||||
|
sete %al
|
||||||
|
2: leal -1(%eax,%eax), %eax
|
||||||
|
movl %eax, L(have_avx)(%rip)
|
||||||
cmpl $0, %eax
|
cmpl $0, %eax
|
||||||
|
|
||||||
1: js L(no_avx5)
|
1: js L(no_avx5)
|
||||||
|
Loading…
Reference in New Issue
Block a user