OLD | NEW |
1 ; | 1 ; |
2 ; jsimdcpu.asm - SIMD instruction support check | 2 ; jsimdcpu.asm - SIMD instruction support check |
3 ; | 3 ; |
4 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB | 4 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB |
5 ; | 5 ; |
6 ; Based on | 6 ; Based on |
7 ; x86 SIMD extension for IJG JPEG library | 7 ; x86 SIMD extension for IJG JPEG library |
8 ; Copyright (C) 1999-2006, MIYASAKA Masaru. | 8 ; Copyright (C) 1999-2006, MIYASAKA Masaru. |
9 ; For conditions of distribution and use, see copyright notice in jsimdext.inc | 9 ; For conditions of distribution and use, see copyright notice in jsimdext.inc |
10 ; | 10 ; |
(...skipping 11 matching lines...) Expand all Loading... |
22 SECTION SEG_TEXT | 22 SECTION SEG_TEXT |
23 BITS 32 | 23 BITS 32 |
24 ; | 24 ; |
25 ; Check if the CPU supports SIMD instructions | 25 ; Check if the CPU supports SIMD instructions |
26 ; | 26 ; |
27 ; GLOBAL(unsigned int) | 27 ; GLOBAL(unsigned int) |
28 ; jpeg_simd_cpu_support (void) | 28 ; jpeg_simd_cpu_support (void) |
29 ; | 29 ; |
30 | 30 |
31 align 16 | 31 align 16 |
32 » global» EXTN(jpeg_simd_cpu_support) | 32 » global» EXTN(jpeg_simd_cpu_support) PRIVATE |
33 | 33 |
34 EXTN(jpeg_simd_cpu_support): | 34 EXTN(jpeg_simd_cpu_support): |
35 push ebx | 35 push ebx |
36 ; push ecx ; need not be preserved | 36 ; push ecx ; need not be preserved |
37 ; push edx ; need not be preserved | 37 ; push edx ; need not be preserved |
38 ; push esi ; unused | 38 ; push esi ; unused |
39 push edi | 39 push edi |
40 | 40 |
41 xor edi,edi ; simd support flag | 41 xor edi,edi ; simd support flag |
42 | 42 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 pop edi | 96 pop edi |
97 ; pop esi ; unused | 97 ; pop esi ; unused |
98 ; pop edx ; need not be preserved | 98 ; pop edx ; need not be preserved |
99 ; pop ecx ; need not be preserved | 99 ; pop ecx ; need not be preserved |
100 pop ebx | 100 pop ebx |
101 ret | 101 ret |
102 | 102 |
103 ; For some reason, the OS X linker does not honor the request to align the | 103 ; For some reason, the OS X linker does not honor the request to align the |
104 ; segment unless we do this. | 104 ; segment unless we do this. |
105 align 16 | 105 align 16 |
OLD | NEW |