1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kernel/eka/compsupp/rvct/ucppinit.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,66 @@
1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "ARM EABI LICENCE.txt"
1.8 +// which accompanies this distribution, and is available
1.9 +// in kernel/eka/compsupp.
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// This file is part of usrt.lib and ksrt.lib.
1.18 +//
1.19 +//
1.20 +
1.21 +
1.22 +extern "C" __asm void __cpp_initialize__aeabi_()
1.23 + {
1.24 + CODE32
1.25 +
1.26 + IMPORT |SHT$$INIT_ARRAY$$Base| [WEAK]
1.27 + IMPORT |SHT$$INIT_ARRAY$$Limit| [WEAK]
1.28 +
1.29 + // Export std::nothrow from here.
1.30 + EXPORT _ZSt7nothrow
1.31 +
1.32 +
1.33 + STMFD r13!,{r3-r5,r14}
1.34 +
1.35 +
1.36 + LDR r4,base
1.37 + LDR r5,limit
1.38 + CMP r4,r5
1.39 +
1.40 + // Exit if the array is empty.
1.41 + LDMEQFD r13!,{r3-r5,pc}
1.42 +
1.43 +loop
1.44 + LDR r0,[r4,#0]
1.45 + #if __ARMCC_VERSION > 300000
1.46 + ADD r0,r0,r4
1.47 + #endif
1.48 +
1.49 +#ifdef __MARM_ARMV4__
1.50 + ADR r14,ret
1.51 + MOV pc,r0
1.52 +#else
1.53 + BLX r0
1.54 +#endif
1.55 +
1.56 +ret
1.57 + ADD r4,r4,#4
1.58 + CMP r4,r5
1.59 + BNE loop
1.60 + LDMFD r13!,{r3-r5,pc}
1.61 +
1.62 +base
1.63 + DCD |SHT$$INIT_ARRAY$$Base|
1.64 +limit
1.65 + DCD |SHT$$INIT_ARRAY$$Limit|
1.66 +
1.67 +_ZSt7nothrow
1.68 + }
1.69 +