| OLD | NEW |
| 1 ; | 1 ; |
| 2 ; jdmrgmmx.asm - merged upsampling/color conversion (MMX) | 2 ; jdmrgmmx.asm - merged upsampling/color 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_buf(b) (b)+12 ; JSAMPIMAGE input_buf | 35 %define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf |
| 36 %define in_row_group_ctr(b) (b)+16 ; JDIMENSION in_row_group_ctr | 36 %define in_row_group_ctr(b) (b)+16 ; JDIMENSION in_row_group_ctr |
| 37 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf | 37 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf |
| 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 3 | 41 %define WK_NUM 3 |
| 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_h2v1_merged_upsample_mmx) | 45 » global» EXTN(jsimd_h2v1_merged_upsample_mmx) PRIVATE |
| 46 | 46 |
| 47 EXTN(jsimd_h2v1_merged_upsample_mmx): | 47 EXTN(jsimd_h2v1_merged_upsample_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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 ; JDIMENSION in_row_group_ctr, | 404 ; JDIMENSION in_row_group_ctr, |
| 405 ; JSAMPARRAY output_buf); | 405 ; JSAMPARRAY output_buf); |
| 406 ; | 406 ; |
| 407 | 407 |
| 408 %define output_width(b) (b)+8 ; JDIMENSION output_width | 408 %define output_width(b) (b)+8 ; JDIMENSION output_width |
| 409 %define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf | 409 %define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf |
| 410 %define in_row_group_ctr(b) (b)+16 ; JDIMENSION in_row_group_ctr | 410 %define in_row_group_ctr(b) (b)+16 ; JDIMENSION in_row_group_ctr |
| 411 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf | 411 %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf |
| 412 | 412 |
| 413 align 16 | 413 align 16 |
| 414 » global» EXTN(jsimd_h2v2_merged_upsample_mmx) | 414 » global» EXTN(jsimd_h2v2_merged_upsample_mmx) PRIVATE |
| 415 | 415 |
| 416 EXTN(jsimd_h2v2_merged_upsample_mmx): | 416 EXTN(jsimd_h2v2_merged_upsample_mmx): |
| 417 push ebp | 417 push ebp |
| 418 mov ebp,esp | 418 mov ebp,esp |
| 419 push ebx | 419 push ebx |
| 420 ; push ecx ; need not be preserved | 420 ; push ecx ; need not be preserved |
| 421 ; push edx ; need not be preserved | 421 ; push edx ; need not be preserved |
| 422 push esi | 422 push esi |
| 423 push edi | 423 push edi |
| 424 | 424 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 pop esi | 457 pop esi |
| 458 ; pop edx ; need not be preserved | 458 ; pop edx ; need not be preserved |
| 459 ; pop ecx ; need not be preserved | 459 ; pop ecx ; need not be preserved |
| 460 pop ebx | 460 pop ebx |
| 461 pop ebp | 461 pop ebp |
| 462 ret | 462 ret |
| 463 | 463 |
| 464 ; For some reason, the OS X linker does not honor the request to align the | 464 ; For some reason, the OS X linker does not honor the request to align the |
| 465 ; segment unless we do this. | 465 ; segment unless we do this. |
| 466 align 16 | 466 align 16 |
| OLD | NEW |