| OLD | NEW |
| 1 ; | 1 ; |
| 2 ; jccolext.asm - colorspace conversion (SSE2) | 2 ; jccolext.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 20 matching lines...) Expand all Loading... |
| 31 %define output_row(b) (b)+20 ; JDIMENSION output_row | 31 %define output_row(b) (b)+20 ; JDIMENSION output_row |
| 32 %define num_rows(b) (b)+24 ; int num_rows | 32 %define num_rows(b) (b)+24 ; int num_rows |
| 33 | 33 |
| 34 %define original_ebp ebp+0 | 34 %define original_ebp ebp+0 |
| 35 %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM] | 35 %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM] |
| 36 %define WK_NUM 8 | 36 %define WK_NUM 8 |
| 37 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr | 37 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr |
| 38 | 38 |
| 39 align 16 | 39 align 16 |
| 40 | 40 |
| 41 global EXTN(jsimd_rgb_ycc_convert_sse2) | 41 global EXTN(jsimd_rgb_ycc_convert_sse2) PRIVATE |
| 42 | 42 |
| 43 EXTN(jsimd_rgb_ycc_convert_sse2): | 43 EXTN(jsimd_rgb_ycc_convert_sse2): |
| 44 push ebp | 44 push ebp |
| 45 mov eax,esp ; eax = original ebp | 45 mov eax,esp ; eax = original ebp |
| 46 sub esp, byte 4 | 46 sub esp, byte 4 |
| 47 and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits | 47 and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits |
| 48 mov [esp],eax | 48 mov [esp],eax |
| 49 mov ebp,esp ; ebp = aligned ebp | 49 mov ebp,esp ; ebp = aligned ebp |
| 50 lea esp, [wk(0)] | 50 lea esp, [wk(0)] |
| 51 pushpic eax ; make a room for GOT address | 51 pushpic eax ; make a room for GOT address |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 ; pop ecx ; need not be preserved | 494 ; pop ecx ; need not be preserved |
| 495 pop ebx | 495 pop ebx |
| 496 mov esp,ebp ; esp <- aligned ebp | 496 mov esp,ebp ; esp <- aligned ebp |
| 497 pop esp ; esp <- original ebp | 497 pop esp ; esp <- original ebp |
| 498 pop ebp | 498 pop ebp |
| 499 ret | 499 ret |
| 500 | 500 |
| 501 ; For some reason, the OS X linker does not honor the request to align the | 501 ; For some reason, the OS X linker does not honor the request to align the |
| 502 ; segment unless we do this. | 502 ; segment unless we do this. |
| 503 align 16 | 503 align 16 |
| OLD | NEW |