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