os/kernelhwsrv/kernel/eka/compsupp/rvct3_1/aeabimem.cia
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     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 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         }