Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
dav1d
Commits
3f875e44
Commit
3f875e44
authored
Dec 18, 2018
by
Henrik Gramner
Browse files
Fix stack corruption in 32-bit emu_edge_ssse3
parent
727fff1a
Pipeline
#3660
passed with stages
in 9 minutes and 29 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/x86/mc_ssse3.asm
View file @
3f875e44
...
...
@@ -773,7 +773,7 @@ cglobal emu_edge, 10, 13, 2, bw, bh, iw, ih, x, \
%define reg_src r1
%define reg_bottomext r0
%define reg_rightext r1
%define reg_blkm
blk
m
%define reg_blkm
r2
m
%endif
;
; ref += iclip(y, 0, ih - 1) * PXSTRIDE(ref_stride)
...
...
@@ -825,7 +825,7 @@ cglobal emu_edge, 10, 13, 2, bw, bh, iw, ih, x, \
cmp
topextq
,
bh
q
cmovg
topextq
,
r3
%if ARCH_X86_32
mov
bottomext
m
,
reg_bottomext
mov
r4
m
,
reg_bottomext
;
; right_ext = iclip(x + bw - iw, 0, bw - 1)
mov
r0
,
r0m
; restore bw
...
...
@@ -845,7 +845,7 @@ cglobal emu_edge, 10, 13, 2, bw, bh, iw, ih, x, \
cmp
reg_rightext
,
bwq
cmovge
reg_rightext
,
r2
%if ARCH_X86_32
mov
rightext
m
,
r1
mov
r3
m
,
r1
%endif
cmp
leftextq
,
bwq
cmovge
leftextq
,
r2
...
...
@@ -867,7 +867,7 @@ cglobal emu_edge, 10, 13, 2, bw, bh, iw, ih, x, \
%else
mov
r1
,
centerhm
; restore r1
sub
centerhq
,
topextq
sub
centerhq
,
bottomext
m
sub
centerhq
,
r4
m
mov
r1m
,
centerhq
%endif
;
...
...
@@ -888,7 +888,7 @@ cglobal emu_edge, 10, 13, 2, bw, bh, iw, ih, x, \
lea
r3
,
[
rightextq
+
leftextq
]
sub
centerwq
,
r3
%else
sub
centerwq
,
r
ightext
m
sub
centerwq
,
r
3
m
sub
centerwq
,
leftextq
%endif
...
...
@@ -946,7 +946,7 @@ cglobal emu_edge, 10, 13, 2, bw, bh, iw, ih, x, \
%if ARCH_X86_64
test
rightextq
,
rightextq
%else
mov
r1
,
r
ightext
m
mov
r1
,
r
3
m
test
r1
,
r1
%endif
jz
.body_loop_end_
%
3
...
...
@@ -969,7 +969,7 @@ cglobal emu_edge, 10, 13, 2, bw, bh, iw, ih, x, \
%if ARCH_X86_64
cmp
r3
,
rightextq
%else
cmp
r3
,
r
ightext
m
cmp
r3
,
r
3
m
%endif
jl
.right_loop_
%
3
.body_loop_end_
%
3
:
...
...
@@ -995,7 +995,7 @@ cglobal emu_edge, 10, 13, 2, bw, bh, iw, ih, x, \
test
rightextq
,
rightextq
jnz
.need_right_ext
%else
cmp
leftextq
,
r
ightext
m
; leftextq == 0
cmp
leftextq
,
r
3
m
; leftextq == 0
jne
.need_right_ext
%endif
v_loop
0
,
0
,
0
...
...
@@ -1006,7 +1006,7 @@ cglobal emu_edge, 10, 13, 2, bw, bh, iw, ih, x, \
%if ARCH_X86_64
test
rightextq
,
rightextq
%else
mov
r3
,
r
ightext
m
mov
r3
,
r
3
m
test
r3
,
r3
%endif
jnz
.need_left_right_ext
...
...
@@ -1040,7 +1040,7 @@ cglobal emu_edge, 10, 13, 2, bw, bh, iw, ih, x, \
jz
.top
%else
xor
r1
,
r1
cmp
r1
,
bottomext
m
cmp
r1
,
r4
m
je
.top
%endif
;
...
...
@@ -1064,7 +1064,7 @@ cglobal emu_edge, 10, 13, 2, bw, bh, iw, ih, x, \
mov
r3
,
srcm
mova
m0
,
[
r3
+
r1
]
lea
r3
,
[
ds
tq
+
r1
]
mov
r4
,
bottomext
m
mov
r4
,
r4
m
%endif
;
.bottom_y_loop:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment