OLD | NEW |
1 ; | 1 ; |
2 ; jdclrss2-64.asm - colorspace conversion (64-bit SSE2) | 2 ; jdclrss2-64.asm - colorspace conversion (64-bit 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 ; Copyright 2009 D. R. Commander | 5 ; Copyright 2009 D. R. Commander |
6 ; | 6 ; |
7 ; Based on | 7 ; Based on |
8 ; x86 SIMD extension for IJG JPEG library | 8 ; x86 SIMD extension for IJG JPEG library |
9 ; Copyright (C) 1999-2006, MIYASAKA Masaru. | 9 ; Copyright (C) 1999-2006, MIYASAKA Masaru. |
10 ; For conditions of distribution and use, see copyright notice in jsimdext.inc | 10 ; For conditions of distribution and use, see copyright notice in jsimdext.inc |
(...skipping 23 matching lines...) Expand all Loading... |
34 ; r10 = JDIMENSION out_width | 34 ; r10 = JDIMENSION out_width |
35 ; r11 = JSAMPIMAGE input_buf | 35 ; r11 = JSAMPIMAGE input_buf |
36 ; r12 = JDIMENSION input_row | 36 ; r12 = JDIMENSION input_row |
37 ; r13 = JSAMPARRAY output_buf | 37 ; r13 = JSAMPARRAY output_buf |
38 ; r14 = int num_rows | 38 ; r14 = int num_rows |
39 | 39 |
40 %define wk(i) rbp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM] | 40 %define wk(i) rbp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM] |
41 %define WK_NUM 2 | 41 %define WK_NUM 2 |
42 | 42 |
43 align 16 | 43 align 16 |
44 » global» EXTN(jsimd_ycc_rgb_convert_sse2) | 44 » global» EXTN(jsimd_ycc_rgb_convert_sse2) PRIVATE |
45 | 45 |
46 EXTN(jsimd_ycc_rgb_convert_sse2): | 46 EXTN(jsimd_ycc_rgb_convert_sse2): |
47 push rbp | 47 push rbp |
48 mov rax,rsp ; rax = original rbp | 48 mov rax,rsp ; rax = original rbp |
49 sub rsp, byte 4 | 49 sub rsp, byte 4 |
50 and rsp, byte (-SIZEOF_XMMWORD) ; align to 128 bits | 50 and rsp, byte (-SIZEOF_XMMWORD) ; align to 128 bits |
51 mov [rsp],rax | 51 mov [rsp],rax |
52 mov rbp,rsp ; rbp = aligned rbp | 52 mov rbp,rsp ; rbp = aligned rbp |
53 lea rsp, [wk(0)] | 53 lea rsp, [wk(0)] |
54 collect_args | 54 collect_args |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 pop rbx | 478 pop rbx |
479 uncollect_args | 479 uncollect_args |
480 mov rsp,rbp ; rsp <- aligned rbp | 480 mov rsp,rbp ; rsp <- aligned rbp |
481 pop rsp ; rsp <- original rbp | 481 pop rsp ; rsp <- original rbp |
482 pop rbp | 482 pop rbp |
483 ret | 483 ret |
484 | 484 |
485 ; For some reason, the OS X linker does not honor the request to align the | 485 ; For some reason, the OS X linker does not honor the request to align the |
486 ; segment unless we do this. | 486 ; segment unless we do this. |
487 align 16 | 487 align 16 |
OLD | NEW |