2 ; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 ; Use of this source code is governed by a BSD-style license
5 ; that can be found in the LICENSE file in the root of the source
6 ; tree. An additional intellectual property rights grant can be found
7 ; in the file PATENTS. All contributing project authors may
8 ; be found in the AUTHORS file in the root of the source tree.
12 %include "vpx_ports/x86_abi_support.asm"
14 ;void vp8_subtract_b_mmx_impl(unsigned char *z, int src_stride,
15 ; short *diff, unsigned char *Predictor,
17 global sym
(vp8_subtract_b_mmx_impl
)
18 sym
(vp8_subtract_b_mmx_impl
):
21 SHADOW_ARGS_TO_STACK
5
28 mov rax
, arg
(3) ;Predictor
30 movsxd rdx
, dword ptr arg
(1);src_stride;
31 movsxd rcx
, dword ptr arg
(4);pitch
76 ;void vp8_subtract_mby_mmx(short *diff, unsigned char *src, unsigned char *pred, int stride)
77 global sym
(vp8_subtract_mby_mmx
)
78 sym
(vp8_subtract_mby_mmx
):
81 SHADOW_ARGS_TO_STACK
4
91 movsxd rdx
, dword ptr arg
(3) ;stride
152 ;void vp8_subtract_mbuv_mmx(short *diff, unsigned char *usrc, unsigned char *vsrc, unsigned char *pred, int stride)
153 global sym
(vp8_subtract_mbuv_mmx
)
154 sym
(vp8_subtract_mbuv_mmx
):
157 SHADOW_ARGS_TO_STACK
5
162 ;short *udiff = diff + 256;
163 ;short *vdiff = diff + 320;
164 ;unsigned char *upred = pred + 256;
165 ;unsigned char *vpred = pred + 320;
167 ;unsigned char *z = usrc;
168 ;unsigned short *diff = udiff;
169 ;unsigned char *Predictor= upred;
171 mov rdi
, arg
(0) ;diff
172 mov rax
, arg
(3) ;pred
173 mov rsi
, arg
(1) ;z = usrc
174 add rdi
, 256*2 ;diff = diff + 256 (shorts)
175 add rax
, 256 ;Predictor = pred + 256
176 movsxd rdx
, dword ptr arg
(4) ;stride;
206 movq mm0
, [rsi
+rdx
*2]
268 movq mm0
, [rsi
+rdx
*2]
297 ;unsigned char *z = vsrc;
298 ;unsigned short *diff = vdiff;
299 ;unsigned char *Predictor= vpred;
301 mov rdi
, arg
(0) ;diff
302 mov rax
, arg
(3) ;pred
303 mov rsi
, arg
(2) ;z = usrc
304 add rdi
, 320*2 ;diff = diff + 320 (shorts)
305 add rax
, 320 ;Predictor = pred + 320
306 movsxd rdx
, dword ptr arg
(4) ;stride;
336 movq mm0
, [rsi
+rdx
*2]
398 movq mm0
, [rsi
+rdx
*2]