kernel/eka/compsupp/rvct/aeabimem.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 drtaeabi.dll.
       
    15 // 
       
    16 //
       
    17 
       
    18 #include <e32cmn.h>
       
    19 
       
    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 instruction
       
    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" __asm void make_mem_functions_call_euser_versions()
       
    33 	{
       
    34 	CODE32
       
    35 
       
    36 	IMPORT memset  [DYNAMIC]
       
    37 	IMPORT memclr  [DYNAMIC]
       
    38 	IMPORT memcpy  [DYNAMIC]
       
    39 	IMPORT memmove [DYNAMIC]
       
    40 
       
    41 	EXPORT __aeabi_memset   [DYNAMIC]
       
    42 	EXPORT __aeabi_memset4  [DYNAMIC]
       
    43 	EXPORT __aeabi_memset8  [DYNAMIC]
       
    44 	EXPORT __aeabi_memclr   [DYNAMIC]
       
    45 	EXPORT __aeabi_memclr4  [DYNAMIC]
       
    46 	EXPORT __aeabi_memclr8  [DYNAMIC]
       
    47 	EXPORT __aeabi_memcpy   [DYNAMIC]
       
    48 	EXPORT __aeabi_memcpy4  [DYNAMIC]
       
    49 	EXPORT __aeabi_memcpy8  [DYNAMIC]
       
    50 	EXPORT __aeabi_memmove  [DYNAMIC]
       
    51 	EXPORT __aeabi_memmove4 [DYNAMIC]
       
    52 	EXPORT __aeabi_memmove8 [DYNAMIC]
       
    53 
       
    54 __aeabi_memset
       
    55 __aeabi_memset4
       
    56 __aeabi_memset8
       
    57 	mov r3, r1
       
    58 	mov r1, r2
       
    59 	mov r2, r3
       
    60 	b memset
       
    61 
       
    62 __aeabi_memclr8
       
    63 __aeabi_memclr4
       
    64 __aeabi_memclr
       
    65 	b memclr
       
    66 
       
    67 __aeabi_memcpy8
       
    68 __aeabi_memcpy4
       
    69 __aeabi_memcpy
       
    70 	b memcpy
       
    71 
       
    72 __aeabi_memmove8
       
    73 __aeabi_memmove4
       
    74 __aeabi_memmove
       
    75 	b memmove
       
    76 	}
       
    77