| OLD | NEW |
| 1 ; | 1 ; |
| 2 ; jdcolext.asm - colorspace conversion (SSE2) | 2 ; jdcolext.asm - colorspace conversion (SSE2) |
| 3 ; | 3 ; |
| 4 ; Copyright 2009, 2012 Pierre Ossman <ossman@cendio.se> for Cendio AB | 4 ; Copyright 2009, 2012 Pierre Ossman <ossman@cendio.se> for Cendio AB |
| 5 ; Copyright 2012 D. R. Commander | 5 ; Copyright 2012 D. R. Commander |
| 6 ; | 6 ; |
| 7 ; Based on | 7 ; Based on |
| 8 ; x86 SIMD extension for IJG JPEG library | 8 ; x86 SIMD extension for IJG JPEG library |
| 9 ; Copyright (C) 1999-2006, MIYASAKA Masaru. | 9 ; Copyright (C) 1999-2006, MIYASAKA Masaru. |
| 10 ; For conditions of distribution and use, see copyright notice in jsimdext.inc | 10 ; For conditions of distribution and use, see copyright notice in jsimdext.inc |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 %define input_row(b) (b)+16 ; JDIMENSION input_row | 34 %define input_row(b) (b)+16 ; JDIMENSION input_row |
| 35 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf | 35 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf |
| 36 %define num_rows(b) (b)+24 ; int num_rows | 36 %define num_rows(b) (b)+24 ; int num_rows |
| 37 | 37 |
| 38 %define original_ebp ebp+0 | 38 %define original_ebp ebp+0 |
| 39 %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM] | 39 %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM] |
| 40 %define WK_NUM 2 | 40 %define WK_NUM 2 |
| 41 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr | 41 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr |
| 42 | 42 |
| 43 align 16 | 43 align 16 |
| 44 global EXTN(jsimd_ycc_rgb_convert_sse2) | 44 global EXTN(jsimd_ycc_rgb_convert_sse2) PRIVATE |
| 45 | 45 |
| 46 EXTN(jsimd_ycc_rgb_convert_sse2): | 46 EXTN(jsimd_ycc_rgb_convert_sse2): |
| 47 push ebp | 47 push ebp |
| 48 mov eax,esp ; eax = original ebp | 48 mov eax,esp ; eax = original ebp |
| 49 sub esp, byte 4 | 49 sub esp, byte 4 |
| 50 and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits | 50 and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits |
| 51 mov [esp],eax | 51 mov [esp],eax |
| 52 mov ebp,esp ; ebp = aligned ebp | 52 mov ebp,esp ; ebp = aligned ebp |
| 53 lea esp, [wk(0)] | 53 lea esp, [wk(0)] |
| 54 pushpic eax ; make a room for GOT address | 54 pushpic eax ; make a room for GOT address |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 ; pop ecx ; need not be preserved | 451 ; pop ecx ; need not be preserved |
| 452 pop ebx | 452 pop ebx |
| 453 mov esp,ebp ; esp <- aligned ebp | 453 mov esp,ebp ; esp <- aligned ebp |
| 454 pop esp ; esp <- original ebp | 454 pop esp ; esp <- original ebp |
| 455 pop ebp | 455 pop ebp |
| 456 ret | 456 ret |
| 457 | 457 |
| 458 ; For some reason, the OS X linker does not honor the request to align the | 458 ; For some reason, the OS X linker does not honor the request to align the |
| 459 ; segment unless we do this. | 459 ; segment unless we do this. |
| 460 align 16 | 460 align 16 |
| OLD | NEW |