OLD | NEW |
1 ; | 1 ; |
2 ; jcclrmmx.asm - colorspace conversion (MMX) | 2 ; jcclrmmx.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 output_buf(b) (b)+16 ; JSAMPIMAGE output_buf | 35 %define output_buf(b) (b)+16 ; JSAMPIMAGE output_buf |
36 %define output_row(b) (b)+20 ; JDIMENSION output_row | 36 %define output_row(b) (b)+20 ; JDIMENSION output_row |
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 8 | 41 %define WK_NUM 8 |
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_rgb_ycc_convert_mmx) | 45 » global» EXTN(jsimd_rgb_ycc_convert_mmx) PRIVATE |
46 | 46 |
47 EXTN(jsimd_rgb_ycc_convert_mmx): | 47 EXTN(jsimd_rgb_ycc_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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 ; pop ecx ; need not be preserved | 470 ; pop ecx ; need not be preserved |
471 pop ebx | 471 pop ebx |
472 mov esp,ebp ; esp <- aligned ebp | 472 mov esp,ebp ; esp <- aligned ebp |
473 pop esp ; esp <- original ebp | 473 pop esp ; esp <- original ebp |
474 pop ebp | 474 pop ebp |
475 ret | 475 ret |
476 | 476 |
477 ; For some reason, the OS X linker does not honor the request to align the | 477 ; For some reason, the OS X linker does not honor the request to align the |
478 ; segment unless we do this. | 478 ; segment unless we do this. |
479 align 16 | 479 align 16 |
OLD | NEW |