kernel/eka/compsupp/rvct3_1/aeabimem.cia
changeset 43 96e5fb8b040d
child 44 36bfc973b146
equal deleted inserted replaced
-1:000000000000 43:96e5fb8b040d
       
     1 /*
       
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * This file is part of drtaeabi.dll.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #include <e32cmn.h>
       
    21 
       
    22 
       
    23 // Call our implementations of memcpy/move/set/clr rather than the ARM supplied
       
    24 // ones.
       
    25 // 
       
    26 // Note that the AEABI switched the order of arg2 and arg3 to save an intruction
       
    27 // when calling 'memset' from 'memclr'.
       
    28 //
       
    29 // Prototypes are:
       
    30 //   void __aeabi_memset8(TAny* aTrg, unsigned int aLength, TInt aValue);
       
    31 //   void __aeabi_memset4(TAny* aTrg, unsigned int aLength, TInt aValue);
       
    32 //   void __aeabi_memset(TAny* aTrg, unsigned int aLength, TInt aValue);
       
    33 
       
    34 extern "C" __NAKED__ void make_mem_functions_call_euser_versions()
       
    35         {
       
    36         asm(".global __aeabi_memset8    ");
       
    37         asm("__aeabi_memset8:           ");
       
    38         asm(".global __aeabi_memset4    ");
       
    39         asm("__aeabi_memset4:           ");
       
    40         asm(".global __aeabi_memset     ");
       
    41         asm("__aeabi_memset:            ");
       
    42         asm("   mov             r3, r1  ");
       
    43         asm("   mov             r1, r2  ");
       
    44         asm("   mov             r2, r3  ");
       
    45         asm("   b               memset  ");
       
    46 
       
    47         asm(".global __aeabi_memclr8    ");
       
    48         asm("__aeabi_memclr8:           ");
       
    49         asm(".global __aeabi_memclr4    ");
       
    50         asm("__aeabi_memclr4:           ");
       
    51         asm(".global __aeabi_memclr     ");
       
    52         asm("__aeabi_memclr:            ");
       
    53         asm("   b               memclr  ");
       
    54         
       
    55         asm(".global __aeabi_memcpy8    ");
       
    56         asm("__aeabi_memcpy8:           ");
       
    57         asm(".global __aeabi_memcpy4    ");
       
    58         asm("__aeabi_memcpy4:           ");
       
    59         asm(".global __aeabi_memcpy     ");
       
    60         asm("__aeabi_memcpy:            ");
       
    61         asm("   b               memcpy  ");
       
    62         
       
    63         asm(".global __aeabi_memmove8   ");
       
    64         asm("__aeabi_memmove8:          ");
       
    65         asm(".global __aeabi_memmove4   ");
       
    66         asm("__aeabi_memmove4:          ");
       
    67         asm(".global __aeabi_memmove    ");
       
    68         asm("__aeabi_memmove:           ");
       
    69         asm("   b               memmove ");
       
    70         }