kernel/eka/compsupp/rvct/ucppinit.cpp
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 2008-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 "ARM EABI LICENCE.txt"
       
     5 // which accompanies this distribution, and is available
       
     6 // in kernel/eka/compsupp.
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // This file is part of usrt.lib and ksrt.lib.
       
    15 // 
       
    16 //
       
    17 
       
    18 
       
    19 extern "C" __asm void __cpp_initialize__aeabi_()
       
    20     {
       
    21     CODE32
       
    22 
       
    23     IMPORT |SHT$$INIT_ARRAY$$Base|  [WEAK]
       
    24     IMPORT |SHT$$INIT_ARRAY$$Limit| [WEAK]
       
    25 
       
    26     // Export std::nothrow from here.
       
    27     EXPORT    _ZSt7nothrow
       
    28     
       
    29 
       
    30     STMFD    r13!,{r3-r5,r14}
       
    31 
       
    32 
       
    33     LDR      r4,base
       
    34     LDR      r5,limit
       
    35     CMP      r4,r5
       
    36     
       
    37     // Exit if the array is empty.
       
    38     LDMEQFD  r13!,{r3-r5,pc}
       
    39 
       
    40 loop
       
    41     LDR      r0,[r4,#0]
       
    42     #if __ARMCC_VERSION > 300000
       
    43     ADD      r0,r0,r4
       
    44     #endif
       
    45 
       
    46 #ifdef __MARM_ARMV4__
       
    47     ADR      r14,ret
       
    48     MOV      pc,r0
       
    49 #else
       
    50     BLX      r0
       
    51 #endif
       
    52 
       
    53 ret
       
    54     ADD      r4,r4,#4
       
    55     CMP      r4,r5
       
    56     BNE      loop
       
    57     LDMFD    r13!,{r3-r5,pc}
       
    58 
       
    59 base
       
    60     DCD    |SHT$$INIT_ARRAY$$Base|
       
    61 limit
       
    62     DCD    |SHT$$INIT_ARRAY$$Limit|
       
    63 
       
    64 _ZSt7nothrow
       
    65     }
       
    66