OLD | NEW |
1 ; | 1 ; |
2 ; jdclrss2.asm - colorspace conversion (SSE2) | 2 ; jdclrss2.asm - colorspace conversion (SSE2) |
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_XMMWORD ; xmmword wk[WK_NUM] | 40 %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword 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_sse2) | 45 » global» EXTN(jsimd_ycc_rgb_convert_sse2) PRIVATE |
46 | 46 |
47 EXTN(jsimd_ycc_rgb_convert_sse2): | 47 EXTN(jsimd_ycc_rgb_convert_sse2): |
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_XMMWORD) ; align to 128 bits | 51 and esp, byte (-SIZEOF_XMMWORD) ; align to 128 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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 ; pop ecx ; need not be preserved | 496 ; pop ecx ; need not be preserved |
497 pop ebx | 497 pop ebx |
498 mov esp,ebp ; esp <- aligned ebp | 498 mov esp,ebp ; esp <- aligned ebp |
499 pop esp ; esp <- original ebp | 499 pop esp ; esp <- original ebp |
500 pop ebp | 500 pop ebp |
501 ret | 501 ret |
502 | 502 |
503 ; For some reason, the OS X linker does not honor the request to align the | 503 ; For some reason, the OS X linker does not honor the request to align the |
504 ; segment unless we do this. | 504 ; segment unless we do this. |
505 align 16 | 505 align 16 |
OLD | NEW |