OLD | NEW |
1 ; | 1 ; |
2 ; jcclrss2.asm - colorspace conversion (SSE2) | 2 ; jcclrss2.asm - colorspace conversion (SSE2) |
3 ; | 3 ; |
4 ; x86 SIMD extension for IJG JPEG library | 4 ; x86 SIMD extension for IJG JPEG library |
5 ; Copyright (C) 1999-2006, MIYASAKA Masaru. | 5 ; Copyright (C) 1999-2006, MIYASAKA Masaru. |
6 ; For conditions of distribution and use, see copyright notice in jsimdext.inc | 6 ; For conditions of distribution and use, see copyright notice in jsimdext.inc |
7 ; | 7 ; |
8 ; This file should be assembled with NASM (Netwide Assembler), | 8 ; This file should be assembled with NASM (Netwide Assembler), |
9 ; can *not* be assembled with Microsoft's MASM or any compatible | 9 ; can *not* be assembled with Microsoft's MASM or any compatible |
10 ; assembler (including Borland's Turbo Assembler). | 10 ; assembler (including Borland's Turbo Assembler). |
(...skipping 22 matching lines...) Expand all Loading... |
33 %define output_row(b) (b)+20 ; JDIMENSION output_row | 33 %define output_row(b) (b)+20 ; JDIMENSION output_row |
34 %define num_rows(b) (b)+24 ; int num_rows | 34 %define num_rows(b) (b)+24 ; int num_rows |
35 | 35 |
36 %define original_ebp ebp+0 | 36 %define original_ebp ebp+0 |
37 %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM] | 37 %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM] |
38 %define WK_NUM 8 | 38 %define WK_NUM 8 |
39 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr | 39 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr |
40 | 40 |
41 align 16 | 41 align 16 |
42 | 42 |
43 » global» EXTN(jsimd_rgb_ycc_convert_sse2) | 43 » global» EXTN(jsimd_rgb_ycc_convert_sse2) PRIVATE |
44 | 44 |
45 EXTN(jsimd_rgb_ycc_convert_sse2): | 45 EXTN(jsimd_rgb_ycc_convert_sse2): |
46 push ebp | 46 push ebp |
47 mov eax,esp ; eax = original ebp | 47 mov eax,esp ; eax = original ebp |
48 sub esp, byte 4 | 48 sub esp, byte 4 |
49 and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits | 49 and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits |
50 mov [esp],eax | 50 mov [esp],eax |
51 mov ebp,esp ; ebp = aligned ebp | 51 mov ebp,esp ; ebp = aligned ebp |
52 lea esp, [wk(0)] | 52 lea esp, [wk(0)] |
53 pushpic eax ; make a room for GOT address | 53 pushpic eax ; make a room for GOT address |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 ; pop ecx ; need not be preserved | 496 ; pop ecx ; need not be preserved |
497 pop ebx | 497 pop ebx |
498 mov esp,ebp ; esp <- aligned ebp | 498 mov esp,ebp ; esp <- aligned ebp |
499 pop esp ; esp <- original ebp | 499 pop esp ; esp <- original ebp |
500 pop ebp | 500 pop ebp |
501 ret | 501 ret |
502 | 502 |
503 ; For some reason, the OS X linker does not honor the request to align the | 503 ; For some reason, the OS X linker does not honor the request to align the |
504 ; segment unless we do this. | 504 ; segment unless we do this. |
505 align 16 | 505 align 16 |
OLD | NEW |