| OLD | NEW |
| 1 ; | 1 ; |
| 2 ; jcgryss2-64.asm - grayscale colorspace conversion (64-bit SSE2) | 2 ; jcgryss2-64.asm - grayscale 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) 2011, D. R. Commander. | 6 ; Copyright (C) 2011, 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 51 push rbx | 51 push rbx |
| 52 | 52 |
| 53 » mov» rcx, r10 | 53 » mov» ecx, r10d |
| 54 test rcx,rcx | 54 test rcx,rcx |
| 55 jz near .return | 55 jz near .return |
| 56 | 56 |
| 57 push rcx | 57 push rcx |
| 58 | 58 |
| 59 mov rsi, r12 | 59 mov rsi, r12 |
| 60 » mov rcx, r13 | 60 » mov ecx, r13d |
| 61 mov rdi, JSAMPARRAY [rsi+0*SIZEOF_JSAMPARRAY] | 61 mov rdi, JSAMPARRAY [rsi+0*SIZEOF_JSAMPARRAY] |
| 62 lea rdi, [rdi+rcx*SIZEOF_JSAMPROW] | 62 lea rdi, [rdi+rcx*SIZEOF_JSAMPROW] |
| 63 | 63 |
| 64 pop rcx | 64 pop rcx |
| 65 | 65 |
| 66 mov rsi, r11 | 66 mov rsi, r11 |
| 67 mov eax, r14d | 67 mov eax, r14d |
| 68 test rax,rax | 68 test rax,rax |
| 69 jle near .return | 69 jle near .return |
| 70 .rowloop: | 70 .rowloop: |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 pop rbx | 355 pop rbx |
| 356 uncollect_args | 356 uncollect_args |
| 357 mov rsp,rbp ; rsp <- aligned rbp | 357 mov rsp,rbp ; rsp <- aligned rbp |
| 358 pop rsp ; rsp <- original rbp | 358 pop rsp ; rsp <- original rbp |
| 359 pop rbp | 359 pop rbp |
| 360 ret | 360 ret |
| 361 | 361 |
| 362 ; For some reason, the OS X linker does not honor the request to align the | 362 ; For some reason, the OS X linker does not honor the request to align the |
| 363 ; segment unless we do this. | 363 ; segment unless we do this. |
| 364 align 16 | 364 align 16 |
| OLD | NEW |