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 .globl vp8_block_error_ppc
18 mfspr r11
, 256 ;# get old VRSAVE
20 mtspr
256, r12
;# set VRSAVE
22 stwu r1
,-32(r1
) ;# create space on the stack
24 stw r5
, 12(r1
) ;# tranfer dc to vector register
26 lvx v0
, 0, r3
;# Coeff
27 lvx v1
, 0, r4
;# dqcoeff
35 vmsumshm v2
, v0
, v0
, v3
;# multiply differences
37 lvx v0
, r10
, r3
;# Coeff
38 lvx v1
, r10
, r4
;# dqcoeff
42 vmsumshm v1
, v0
, v0
, v2
;# multiply differences
43 vsumsws v1
, v1
, v3
;# sum up
46 lwz r3
, 12(r1
) ;# return value
48 addi r1
, r1
, 32 ;# recover stack
49 mtspr
256, r11
;# reset old VRSAVE