kernel/eka/compsupp/rvct2_2/aeabimem.cia
changeset 9 96e5fb8b040d
child 10 36bfc973b146
equal deleted inserted replaced
-1:000000000000 9:96e5fb8b040d
       
     1 /*
       
     2 * Copyright (c) 2005-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 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <e32cmn.h>
       
    20 
       
    21 // Call our implementations of memcpy/move/set/clr rather than the ARM supplied
       
    22 // ones.
       
    23 // 
       
    24 // Note that the AEABI switched the order of arg2 and arg3 to save an intruction
       
    25 // when calling 'memset' from 'memclr'.
       
    26 //
       
    27 // Prototypes are:
       
    28 //   void __aeabi_memset8(TAny* aTrg, unsigned int aLength, TInt aValue);
       
    29 //   void __aeabi_memset4(TAny* aTrg, unsigned int aLength, TInt aValue);
       
    30 //   void __aeabi_memset(TAny* aTrg, unsigned int aLength, TInt aValue);
       
    31 
       
    32 extern "C" __NAKED__ void make_mem_functions_call_euser_versions()
       
    33 	{
       
    34 	asm(".global __aeabi_memset8  ");
       
    35 	asm("__aeabi_memset8: 		  ");
       
    36 	asm(".global __aeabi_memset4  ");
       
    37 	asm("__aeabi_memset4: 		  ");
       
    38 	asm(".global __aeabi_memset   ");
       
    39 	asm("__aeabi_memset: 		  ");
       
    40 	asm("	mov		r3, r1		  ");
       
    41 	asm("	mov		r1, r2		  ");
       
    42 	asm("	mov		r2, r3		  ");
       
    43 	asm("	b		memset		  ");
       
    44 
       
    45 	asm(".global __aeabi_memclr8  ");
       
    46 	asm("__aeabi_memclr8: 		  ");
       
    47 	asm(".global __aeabi_memclr4  ");
       
    48 	asm("__aeabi_memclr4: 		  ");
       
    49 	asm(".global __aeabi_memclr   ");
       
    50 	asm("__aeabi_memclr: 		  ");
       
    51 	asm("	b		memclr		  ");
       
    52 	
       
    53 	asm(".global __aeabi_memcpy8  ");
       
    54 	asm("__aeabi_memcpy8: 		  ");
       
    55 	asm(".global __aeabi_memcpy4  ");
       
    56 	asm("__aeabi_memcpy4: 		  ");
       
    57 	asm(".global __aeabi_memcpy   ");
       
    58 	asm("__aeabi_memcpy: 		  ");
       
    59 	asm("	b		memcpy		  ");
       
    60 	
       
    61 	asm(".global __aeabi_memmove8 ");
       
    62 	asm("__aeabi_memmove8: 		  ");
       
    63 	asm(".global __aeabi_memmove4 ");
       
    64 	asm("__aeabi_memmove4: 		  ");
       
    65 	asm(".global __aeabi_memmove  ");
       
    66 	asm("__aeabi_memmove: 		  ");
       
    67 	asm("	b		memmove		  ");
       
    68 	}