History

Merge "Add prefetch before variance calculation"

Yunqing Wang committed 15 years ago

Commit cfaee9f2 parents 3e6d476 d96ba651 file · +28 −4Browse files

Unified · Split

vp8/encoder/x86/variance_impl_sse2.asm+28−4
@@ -85,10 +85,9 @@ sym(vp8_get16x16var_sse2): · 84 unmodified lines
85 push rbp85 push rbp
86 mov rbp, rsp86 mov rbp, rsp
87 SHADOW_ARGS_TO_STACK 687 SHADOW_ARGS_TO_STACK 6
88 GET_GOT rbx88 push rbx
89 push rsi89 push rsi
90 push rdi90 push rdi
91 sub rsp, 16
92 ; end prolog91 ; end prolog
93 92
94 mov rsi, arg(0) ;[src_ptr]93 mov rsi, arg(0) ;[src_ptr]
@@ -97,6 +96,29 @@ sym(vp8_get16x16var_sse2): · 2 unmodified lines
97 movsxd rax, DWORD PTR arg(1) ;[source_stride]96 movsxd rax, DWORD PTR arg(1) ;[source_stride]
98 movsxd rdx, DWORD PTR arg(3) ;[recon_stride]97 movsxd rdx, DWORD PTR arg(3) ;[recon_stride]
99 98
99 ; Prefetch data
100 lea rcx, [rax+rax*2]
101 prefetcht0 [rsi]
102 prefetcht0 [rsi+rax]
103 prefetcht0 [rsi+rax*2]
104 prefetcht0 [rsi+rcx]
105 lea rbx, [rsi+rax*4]
106 prefetcht0 [rbx]
107 prefetcht0 [rbx+rax]
108 prefetcht0 [rbx+rax*2]
109 prefetcht0 [rbx+rcx]
110
111 lea rcx, [rdx+rdx*2]
112 prefetcht0 [rdi]
113 prefetcht0 [rdi+rdx]
114 prefetcht0 [rdi+rdx*2]
115 prefetcht0 [rdi+rcx]
116 lea rbx, [rdi+rdx*4]
117 prefetcht0 [rbx]
118 prefetcht0 [rbx+rdx]
119 prefetcht0 [rbx+rdx*2]
120 prefetcht0 [rbx+rcx]
121
100 pxor xmm0, xmm0 ; clear xmm0 for unpack122 pxor xmm0, xmm0 ; clear xmm0 for unpack
101 pxor xmm7, xmm7 ; clear xmm7 for accumulating diffs123 pxor xmm7, xmm7 ; clear xmm7 for accumulating diffs
102 124
@@ -107,6 +129,9 @@ var16loop: · 4 unmodified lines
107 movdqu xmm1, XMMWORD PTR [rsi]129 movdqu xmm1, XMMWORD PTR [rsi]
108 movdqu xmm2, XMMWORD PTR [rdi]130 movdqu xmm2, XMMWORD PTR [rdi]
109 131
132 prefetcht0 [rsi+rax*8]
133 prefetcht0 [rdi+rdx*8]
134
110 movdqa xmm3, xmm1135 movdqa xmm3, xmm1
111 movdqa xmm4, xmm2136 movdqa xmm4, xmm2
112 137
@@ -178,10 +203,9 @@ var16loop: · 65 unmodified lines
178 203
179 204
180 ; begin epilog205 ; begin epilog
181 add rsp, 16
182 pop rdi206 pop rdi
183 pop rsi207 pop rsi
184 RESTORE_GOT208 pop rbx
185 UNSHADOW_ARGS209 UNSHADOW_ARGS
186 pop rbp210 pop rbp
187 ret211 ret

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t