|
1 // Copyright (c) 2007-2010 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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 // |
|
16 |
|
17 |
|
18 #include <u32std.h> |
|
19 |
|
20 // unused function that contains enough padding that the test function |
|
21 // RMDebugDemandPagingTest starts in a new page. |
|
22 __NAKED__ TInt RMDebugDemandPagingPaddingBefore() |
|
23 { |
|
24 asm("movs r2,r0"); |
|
25 asm("adds r0,r2,r1"); |
|
26 asm("bx lr"); |
|
27 // add padding to make this function 4kb in size. |
|
28 // The 4084 corresponds to 2^12 (=4096) - 12, |
|
29 // the 12 being the total size of the movs, adds and bx instructions. |
|
30 asm(".space 4084"); |
|
31 } |
|
32 |
|
33 // test function which is in a page by itself |
|
34 __NAKED__ TInt RMDebugDemandPagingTest() |
|
35 { |
|
36 asm("movs r2,r0"); |
|
37 asm("adds r0,r2,r1"); |
|
38 asm("bx lr"); |
|
39 // add padding to make this function 4kb in size. |
|
40 // The 4084 corresponds to 2^12 (=4096) - 12, |
|
41 // the 12 being the total size of the movs, adds and bx instructions. |
|
42 asm(".space 4084"); |
|
43 } |
|
44 |
|
45 // unused function that contains enough padding to ensure that no used code |
|
46 // is in the same page as RMDebugDemandPagingTest |
|
47 __NAKED__ TInt RMDebugDemandPagingPaddingAfter() |
|
48 { |
|
49 asm("movs r2,r0"); |
|
50 asm("adds r0,r2,r1"); |
|
51 asm("bx lr"); |
|
52 // add padding to make this function 4kb in size. |
|
53 // The 4084 corresponds to 2^12 (=4096) - 12, |
|
54 // the 12 being the total size of the movs, adds and bx instructions. |
|
55 asm(".space 4084"); |
|
56 } |
|
57 |