0
|
1 |
// Copyright (c) 1994-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".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
#include <arm_mem.h>
|
|
17 |
|
|
18 |
|
|
19 |
__NAKED__ TBool Exc::IsMagic(TLinAddr /*anAddress*/)
|
|
20 |
//
|
|
21 |
// Return TRUE if anAddress is a 'magic' exception handling instruction
|
|
22 |
//
|
|
23 |
{
|
|
24 |
asm("adr r1, __magic_addresses "); // r1 points to list of magic addresses
|
|
25 |
asm("is_magic_1: ");
|
|
26 |
asm("ldr r2, [r1], #4 "); // r2=next magic address to check
|
|
27 |
asm("cmp r2, r0 "); // is r0=magic address?
|
|
28 |
asm("cmpne r2, #0 "); // if not, have we reached end of list?
|
|
29 |
asm("bne is_magic_1 "); // if neither, check next address
|
|
30 |
asm("movs r0, r2 "); // r0=0 if not magic, r0 unchanged if magic
|
|
31 |
__JUMP(,lr);
|
|
32 |
|
|
33 |
asm("__magic_addresses: ");
|
|
34 |
asm(".word __magic_address_kusaferead ");
|
|
35 |
asm(".word __magic_address_saferead ");
|
|
36 |
asm(".word __magic_address_kusafewrite ");
|
|
37 |
asm(".word __magic_address_safewrite ");
|
|
38 |
asm(".word __magic_address_msg_lookup_1 "); // in preprocess handler
|
|
39 |
asm(".word __magic_address_readdesheader1 ");
|
|
40 |
asm(".word __magic_address_readdesheader2 ");
|
|
41 |
asm(".word __magic_address_readdesheader3 ");
|
|
42 |
#ifdef __MESSAGE_MACHINE_CODED_2__
|
|
43 |
asm(".word __magic_address_msg_lookup_2 ");
|
|
44 |
#endif
|
|
45 |
#ifdef __CLIENT_REQUEST_MACHINE_CODED__
|
|
46 |
asm(".word __magic_address_client_request_callback");
|
|
47 |
asm(".word __magic_address_svr_accept_1 ");
|
|
48 |
asm(".word __magic_address_svr_accept_2 ");
|
|
49 |
asm(".word __magic_address_svr_accept_3 ");
|
|
50 |
asm(".word __magic_address_svr_accept_4 ");
|
|
51 |
asm(".word __magic_address_svr_accept_5 ");
|
|
52 |
asm(".word __magic_address_svr_accept_6 ");
|
|
53 |
asm(".word __magic_address_svr_accept_7 ");
|
|
54 |
asm(".word __magic_address_svr_accept_8 ");
|
|
55 |
#endif
|
|
56 |
#ifdef __REQUEST_COMPLETE_MACHINE_CODED__
|
|
57 |
asm(".word __magic_address_reqc ");
|
|
58 |
asm(".word __magic_address_kern_request_complete ");
|
|
59 |
#endif
|
|
60 |
// list terminator
|
|
61 |
asm(".word 0 ");
|
|
62 |
}
|
|
63 |
|