Update contrib.
1 // Copyright (c) 2007-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\defrag\t_pagemove.cia
15 // All rights reserved.
16 // This code is used to test code mofication while moving a page.
25 * Assembly code to test pagemove while writing to code section.
26 * NOTE: Do not change instruction ordering without looking at t_pagemove.cpp
27 * Look at TestCodeModification and TestCodeAsync (TestCodeModificationAsync)
29 __NAKED__ TInt TestCodeModFunc(void)
33 /* Need to put 3f here because this jump will move up by one instruction */
45 __NAKED__ TInt Increment(TInt)
47 asm("add r0, r0, #1 ");
49 asm("Increment__Fi_end: ");
52 __NAKED__ TUint Increment_Length()
54 asm("adr r0, Increment__Fi_end ");
55 asm("adr r1, Increment__Fi ");
56 asm("sub r0, r0, r1 ");
60 __NAKED__ TInt Decrement(TInt)
62 asm("sub r0, r0, #1 ");
64 asm("Decrement__Fi_end: ");
67 __NAKED__ TUint Decrement_Length()
69 asm("adr r0, Decrement__Fi_end ");
70 asm("adr r1, Decrement__Fi ");
71 asm("sub r0, r0, r1 ");