OLD | NEW |
1 ; | 1 ; |
2 ; jdcolext.asm - colorspace conversion (MMX) | 2 ; jdcolext.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 input_row(b) (b)+16 ; JDIMENSION input_row | 33 %define input_row(b) (b)+16 ; JDIMENSION input_row |
34 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf | 34 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf |
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 2 | 39 %define WK_NUM 2 |
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_ycc_rgb_convert_mmx) | 43 global EXTN(jsimd_ycc_rgb_convert_mmx) PRIVATE |
44 | 44 |
45 EXTN(jsimd_ycc_rgb_convert_mmx): | 45 EXTN(jsimd_ycc_rgb_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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 ; pop ecx ; need not be preserved | 396 ; pop ecx ; need not be preserved |
397 pop ebx | 397 pop ebx |
398 mov esp,ebp ; esp <- aligned ebp | 398 mov esp,ebp ; esp <- aligned ebp |
399 pop esp ; esp <- original ebp | 399 pop esp ; esp <- original ebp |
400 pop ebp | 400 pop ebp |
401 ret | 401 ret |
402 | 402 |
403 ; For some reason, the OS X linker does not honor the request to align the | 403 ; For some reason, the OS X linker does not honor the request to align the |
404 ; segment unless we do this. | 404 ; segment unless we do this. |
405 align 16 | 405 align 16 |
OLD | NEW |