Reformat jsimdcpu[-64].asm to improve readability

This commit is contained in:
DRC
2016-07-11 19:42:37 -05:00
parent b331385e8a
commit 1be87b6273
2 changed files with 87 additions and 87 deletions

View File

@@ -36,13 +36,13 @@ EXTN(jpeg_simd_cpu_support):
push rbx push rbx
push rdi push rdi
xor rdi,rdi ; simd support flag xor rdi, rdi ; simd support flag
; Check for AVX2 instruction support ; Check for AVX2 instruction support
mov rax, 7 mov rax, 7
xor rcx,rcx xor rcx, rcx
cpuid cpuid
mov rax,rbx ; rax = Extended feature flags mov rax, rbx ; rax = Extended feature flags
or rdi, JSIMD_SSE2 or rdi, JSIMD_SSE2
or rdi, JSIMD_SSE or rdi, JSIMD_SSE
@@ -51,7 +51,7 @@ EXTN(jpeg_simd_cpu_support):
or rdi, JSIMD_AVX2 or rdi, JSIMD_AVX2
.return: .return:
mov rax,rdi mov rax, rdi
pop rdi pop rdi
pop rbx pop rbx

View File

@@ -38,29 +38,29 @@ EXTN(jpeg_simd_cpu_support):
; push esi ; unused ; push esi ; unused
push edi push edi
xor edi,edi ; simd support flag xor edi, edi ; simd support flag
pushfd pushfd
pop eax pop eax
mov edx,eax mov edx, eax
xor eax, 1<<21 ; flip ID bit in EFLAGS xor eax, 1<<21 ; flip ID bit in EFLAGS
push eax push eax
popfd popfd
pushfd pushfd
pop eax pop eax
xor eax,edx xor eax, edx
jz short .return ; CPUID is not supported jz short .return ; CPUID is not supported
; Check for MMX instruction support ; Check for MMX instruction support
xor eax,eax xor eax, eax
cpuid cpuid
test eax,eax test eax, eax
jz short .return jz short .return
xor eax,eax xor eax, eax
inc eax inc eax
cpuid cpuid
mov eax,edx ; eax = Standard feature flags mov eax, edx ; eax = Standard feature flags
test eax, 1<<23 ; bit23:MMX test eax, 1<<23 ; bit23:MMX
jz short .no_mmx jz short .no_mmx
@@ -77,9 +77,9 @@ EXTN(jpeg_simd_cpu_support):
; Check for AVX2 instruction support ; Check for AVX2 instruction support
mov eax, 7 mov eax, 7
xor ecx,ecx xor ecx, ecx
cpuid cpuid
mov eax,ebx mov eax, ebx
test eax, 1<<5 ; bit5:AVX2 test eax, 1<<5 ; bit5:AVX2
jz short .no_avx2 jz short .no_avx2
or edi, JSIMD_AVX2 or edi, JSIMD_AVX2
@@ -93,7 +93,7 @@ EXTN(jpeg_simd_cpu_support):
mov eax, 0x80000001 mov eax, 0x80000001
cpuid cpuid
mov eax,edx ; eax = Extended feature flags mov eax, edx ; eax = Extended feature flags
test eax, 1<<31 ; bit31:3DNow!(vendor independent) test eax, 1<<31 ; bit31:3DNow!(vendor independent)
jz short .no_3dnow jz short .no_3dnow
@@ -101,7 +101,7 @@ EXTN(jpeg_simd_cpu_support):
.no_3dnow: .no_3dnow:
.return: .return:
mov eax,edi mov eax, edi
pop edi pop edi
; pop esi ; unused ; pop esi ; unused