| OLD | NEW |
| 1 ; | 1 ; |
| 2 ; jdclrmmx.asm - colorspace conversion (MMX) | 2 ; jdclrmmx.asm - colorspace conversion (MMX) |
| 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 24 matching lines...) Expand all Loading... |
| 35 %define input_row(b) (b)+16 ; JDIMENSION input_row | 35 %define input_row(b) (b)+16 ; JDIMENSION input_row |
| 36 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf | 36 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf |
| 37 %define num_rows(b) (b)+24 ; int num_rows | 37 %define num_rows(b) (b)+24 ; int num_rows |
| 38 | 38 |
| 39 %define original_ebp ebp+0 | 39 %define original_ebp ebp+0 |
| 40 %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM] | 40 %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM] |
| 41 %define WK_NUM 2 | 41 %define WK_NUM 2 |
| 42 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr | 42 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr |
| 43 | 43 |
| 44 align 16 | 44 align 16 |
| 45 » global» EXTN(jsimd_ycc_rgb_convert_mmx) | 45 » global» EXTN(jsimd_ycc_rgb_convert_mmx) PRIVATE |
| 46 | 46 |
| 47 EXTN(jsimd_ycc_rgb_convert_mmx): | 47 EXTN(jsimd_ycc_rgb_convert_mmx): |
| 48 push ebp | 48 push ebp |
| 49 mov eax,esp ; eax = original ebp | 49 mov eax,esp ; eax = original ebp |
| 50 sub esp, byte 4 | 50 sub esp, byte 4 |
| 51 and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits | 51 and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits |
| 52 mov [esp],eax | 52 mov [esp],eax |
| 53 mov ebp,esp ; ebp = aligned ebp | 53 mov ebp,esp ; ebp = aligned ebp |
| 54 lea esp, [wk(0)] | 54 lea esp, [wk(0)] |
| 55 pushpic eax ; make a room for GOT address | 55 pushpic eax ; make a room for GOT address |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 ; pop ecx ; need not be preserved | 398 ; pop ecx ; need not be preserved |
| 399 pop ebx | 399 pop ebx |
| 400 mov esp,ebp ; esp <- aligned ebp | 400 mov esp,ebp ; esp <- aligned ebp |
| 401 pop esp ; esp <- original ebp | 401 pop esp ; esp <- original ebp |
| 402 pop ebp | 402 pop ebp |
| 403 ret | 403 ret |
| 404 | 404 |
| 405 ; For some reason, the OS X linker does not honor the request to align the | 405 ; For some reason, the OS X linker does not honor the request to align the |
| 406 ; segment unless we do this. | 406 ; segment unless we do this. |
| 407 align 16 | 407 align 16 |
| OLD | NEW |