OLD | NEW |
1 ; | 1 ; |
2 ; jccolext.asm - colorspace conversion (MMX) | 2 ; jccolext.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 22 matching lines...) Expand all Loading... |
33 %define output_buf(b) (b)+16 ; JSAMPIMAGE output_buf | 33 %define output_buf(b) (b)+16 ; JSAMPIMAGE output_buf |
34 %define output_row(b) (b)+20 ; JDIMENSION output_row | 34 %define output_row(b) (b)+20 ; JDIMENSION output_row |
35 %define num_rows(b) (b)+24 ; int num_rows | 35 %define num_rows(b) (b)+24 ; int num_rows |
36 | 36 |
37 %define original_ebp ebp+0 | 37 %define original_ebp ebp+0 |
38 %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM] | 38 %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM] |
39 %define WK_NUM 8 | 39 %define WK_NUM 8 |
40 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr | 40 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr |
41 | 41 |
42 align 16 | 42 align 16 |
43 global EXTN(jsimd_rgb_ycc_convert_mmx) | 43 global EXTN(jsimd_rgb_ycc_convert_mmx) PRIVATE |
44 | 44 |
45 EXTN(jsimd_rgb_ycc_convert_mmx): | 45 EXTN(jsimd_rgb_ycc_convert_mmx): |
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_MMWORD) ; align to 64 bits | 49 and esp, byte (-SIZEOF_MMWORD) ; align to 64 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 ; pop ecx ; need not be preserved | 468 ; pop ecx ; need not be preserved |
469 pop ebx | 469 pop ebx |
470 mov esp,ebp ; esp <- aligned ebp | 470 mov esp,ebp ; esp <- aligned ebp |
471 pop esp ; esp <- original ebp | 471 pop esp ; esp <- original ebp |
472 pop ebp | 472 pop ebp |
473 ret | 473 ret |
474 | 474 |
475 ; For some reason, the OS X linker does not honor the request to align the | 475 ; For some reason, the OS X linker does not honor the request to align the |
476 ; segment unless we do this. | 476 ; segment unless we do this. |
477 align 16 | 477 align 16 |
OLD | NEW |