| OLD | NEW |
| 1 ; | 1 ; |
| 2 ; jccolext.asm - colorspace conversion (64-bit SSE2) | 2 ; jccolext.asm - colorspace conversion (64-bit SSE2) |
| 3 ; | 3 ; |
| 4 ; x86 SIMD extension for IJG JPEG library | 4 ; x86 SIMD extension for IJG JPEG library |
| 5 ; Copyright (C) 1999-2006, MIYASAKA Masaru. | 5 ; Copyright (C) 1999-2006, MIYASAKA Masaru. |
| 6 ; Copyright (C) 2009, D. R. Commander. | 6 ; Copyright (C) 2009, D. R. Commander. |
| 7 ; For conditions of distribution and use, see copyright notice in jsimdext.inc | 7 ; For conditions of distribution and use, see copyright notice in jsimdext.inc |
| 8 ; | 8 ; |
| 9 ; This file should be assembled with NASM (Netwide Assembler), | 9 ; This file should be assembled with NASM (Netwide Assembler), |
| 10 ; can *not* be assembled with Microsoft's MASM or any compatible | 10 ; can *not* be assembled with Microsoft's MASM or any compatible |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 ; r11 = JSAMPARRAY input_buf | 30 ; r11 = JSAMPARRAY input_buf |
| 31 ; r12 = JSAMPIMAGE output_buf | 31 ; r12 = JSAMPIMAGE output_buf |
| 32 ; r13 = JDIMENSION output_row | 32 ; r13 = JDIMENSION output_row |
| 33 ; r14 = int num_rows | 33 ; r14 = int num_rows |
| 34 | 34 |
| 35 %define wk(i) rbp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM] | 35 %define wk(i) rbp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM] |
| 36 %define WK_NUM 8 | 36 %define WK_NUM 8 |
| 37 | 37 |
| 38 align 16 | 38 align 16 |
| 39 | 39 |
| 40 global EXTN(jsimd_rgb_ycc_convert_sse2) | 40 global EXTN(jsimd_rgb_ycc_convert_sse2) PRIVATE |
| 41 | 41 |
| 42 EXTN(jsimd_rgb_ycc_convert_sse2): | 42 EXTN(jsimd_rgb_ycc_convert_sse2): |
| 43 push rbp | 43 push rbp |
| 44 mov rax,rsp ; rax = original rbp | 44 mov rax,rsp ; rax = original rbp |
| 45 sub rsp, byte 4 | 45 sub rsp, byte 4 |
| 46 and rsp, byte (-SIZEOF_XMMWORD) ; align to 128 bits | 46 and rsp, byte (-SIZEOF_XMMWORD) ; align to 128 bits |
| 47 mov [rsp],rax | 47 mov [rsp],rax |
| 48 mov rbp,rsp ; rbp = aligned rbp | 48 mov rbp,rsp ; rbp = aligned rbp |
| 49 lea rsp, [wk(0)] | 49 lea rsp, [wk(0)] |
| 50 collect_args | 50 collect_args |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 pop rbx | 476 pop rbx |
| 477 uncollect_args | 477 uncollect_args |
| 478 mov rsp,rbp ; rsp <- aligned rbp | 478 mov rsp,rbp ; rsp <- aligned rbp |
| 479 pop rsp ; rsp <- original rbp | 479 pop rsp ; rsp <- original rbp |
| 480 pop rbp | 480 pop rbp |
| 481 ret | 481 ret |
| 482 | 482 |
| 483 ; For some reason, the OS X linker does not honor the request to align the | 483 ; For some reason, the OS X linker does not honor the request to align the |
| 484 ; segment unless we do this. | 484 ; segment unless we do this. |
| 485 align 16 | 485 align 16 |
| OLD | NEW |