sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #include sl@0: sl@0: // unused function that contains enough padding that the test function sl@0: // RMDebugDemandPagingTest starts in a new page. sl@0: __NAKED__ TInt RMDebugDemandPagingPaddingBefore() sl@0: { sl@0: asm("movs r2,r0"); sl@0: asm("adds r0,r2,r1"); sl@0: asm("bx lr"); sl@0: // add padding to make this function 4kb in size. sl@0: // The 4084 corresponds to 2^12 (=4096) - 12, sl@0: // the 12 being the total size of the movs, adds and bx instructions. sl@0: asm(".space 4084"); sl@0: } sl@0: sl@0: // test function which is in a page by itself sl@0: __NAKED__ TInt RMDebugDemandPagingTest() sl@0: { sl@0: asm("movs r2,r0"); sl@0: asm("adds r0,r2,r1"); sl@0: asm("bx lr"); sl@0: // add padding to make this function 4kb in size. sl@0: // The 4084 corresponds to 2^12 (=4096) - 12, sl@0: // the 12 being the total size of the movs, adds and bx instructions. sl@0: asm(".space 4084"); sl@0: } sl@0: sl@0: // unused function that contains enough padding to ensure that no used code sl@0: // is in the same page as RMDebugDemandPagingTest sl@0: __NAKED__ TInt RMDebugDemandPagingPaddingAfter() sl@0: { sl@0: asm("movs r2,r0"); sl@0: asm("adds r0,r2,r1"); sl@0: asm("bx lr"); sl@0: // add padding to make this function 4kb in size. sl@0: // The 4084 corresponds to 2^12 (=4096) - 12, sl@0: // the 12 being the total size of the movs, adds and bx instructions. sl@0: asm(".space 4084"); sl@0: } sl@0: