Update contrib.
1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test\misc\t_cp0.cia
22 __NAKED__ TUint32 BCUCTL()
24 asm("mrc p13, 0, r0, c0, c1, 0 ");
28 __NAKED__ void GetAcc0(TInt64&)
31 asm("stmia r0, {r1,r2} ");
35 __NAKED__ void SetAcc0(const TInt64&)
37 asm("ldmia r0, {r1,r2} ");
42 __NAKED__ void InnerProduct(TInt64& /*aResult*/, const TInt16* /*aVec1*/, const TInt16* /*aVec2*/, TInt /*aLength*/)
44 // Calculate the inner product of vectors using the DSP coprocessor
47 asm("str lr, [sp, #-4]! ");
52 asm("ldrh r12, [r1], #2 ");
53 asm("ldrh r14, [r2], #2 ");
55 asm("subs r3, r3, #1 ");
58 asm("stmia r0, {r12,r14} ");
59 asm("ldr pc, [sp], #4 ");
62 __NAKED__ void InnerProduct2(TInt64& /*aResult*/, const TInt16* /*aVec1*/, const TInt16* /*aVec2*/, TInt /*aLength*/)
64 // Calculate the inner product of vectors using the normal multiply instructions
67 asm("stmfd sp!, {r4-r5,lr} ");
71 asm("ldrsh r12, [r1], #2 ");
72 asm("ldrsh r14, [r2], #2 ");
73 asm("smlal r4, r5, r12, r14 ");
74 asm("subs r3, r3, #1 ");
76 asm("stmia r0, {r4,r5} ");
77 asm("ldmfd sp!, {r4-r5,pc} ");