Skip to content

Commit

Permalink
Oops. The Windows version of collect_args/uncollect_args uses rsp, so…
Browse files Browse the repository at this point in the history
… we still need the rsp prologue/epilogue, despite the fact that we aren't using the stack as a work area. This fixes a segfault on Windows caused by r1335.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1336 632fc199-4ca6-4c93-a231-07263d6284db
  • Loading branch information
dcommander committed Aug 9, 2014
1 parent a8ab342 commit 8a74848
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions simd/jccolext-sse2-64.asm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
global EXTN(jsimd_rgb_ycc_convert_sse2)

EXTN(jsimd_rgb_ycc_convert_sse2):
push rbp
mov rax,rsp
mov rbp,rsp
collect_args
push rbx

Expand Down Expand Up @@ -453,6 +456,7 @@ EXTN(jsimd_rgb_ycc_convert_sse2):
.return:
pop rbx
uncollect_args
pop rbp
ret

; For some reason, the OS X linker does not honor the request to align the
Expand Down
4 changes: 4 additions & 0 deletions simd/jcgryext-sse2-64.asm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
global EXTN(jsimd_rgb_gray_convert_sse2)

EXTN(jsimd_rgb_gray_convert_sse2):
push rbp
mov rax,rsp
mov rbp,rsp
collect_args
push rbx

Expand Down Expand Up @@ -338,6 +341,7 @@ EXTN(jsimd_rgb_gray_convert_sse2):
.return:
pop rbx
uncollect_args
pop rbp
ret

; For some reason, the OS X linker does not honor the request to align the
Expand Down
4 changes: 4 additions & 0 deletions simd/jfdctfst-sse2-64.asm
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ PW_F1306 times 8 dw F_1_306 << CONST_SHIFT
global EXTN(jsimd_fdct_ifast_sse2)

EXTN(jsimd_fdct_ifast_sse2):
push rbp
mov rax,rsp
mov rbp,rsp
collect_args

; ---- Pass 1: process rows.
Expand Down Expand Up @@ -343,6 +346,7 @@ EXTN(jsimd_fdct_ifast_sse2):
movdqa XMMWORD [XMMBLOCK(7,0,rdx,SIZEOF_DCTELEM)], xmm15

uncollect_args
pop rbp
ret

; For some reason, the OS X linker does not honor the request to align the
Expand Down
4 changes: 4 additions & 0 deletions simd/jfdctint-sse2-64.asm
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ PW_DESCALE_P2X times 8 dw 1 << (PASS1_BITS-1)
global EXTN(jsimd_fdct_islow_sse2)

EXTN(jsimd_fdct_islow_sse2):
push rbp
mov rax,rsp
mov rbp,rsp
collect_args

; ---- Pass 1: process rows.
Expand Down Expand Up @@ -552,6 +555,7 @@ EXTN(jsimd_fdct_islow_sse2):
movdqa XMMWORD [XMMBLOCK(7,0,rdx,SIZEOF_DCTELEM)], xmm15

uncollect_args
pop rbp
ret

; For some reason, the OS X linker does not honor the request to align the
Expand Down

0 comments on commit 8a74848

Please sign in to comment.