kernel/eka/compsupp/rvct3_1/aeabimem.cia
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 17 Dec 2009 09:24:54 +0200
changeset 43 96e5fb8b040d
child 44 36bfc973b146
permissions -rw-r--r--
Revision: 200951 Kit: 200951

/*
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
* This file is part of drtaeabi.dll.
*
*/


#include <e32cmn.h>


// Call our implementations of memcpy/move/set/clr rather than the ARM supplied
// ones.
// 
// Note that the AEABI switched the order of arg2 and arg3 to save an intruction
// when calling 'memset' from 'memclr'.
//
// Prototypes are:
//   void __aeabi_memset8(TAny* aTrg, unsigned int aLength, TInt aValue);
//   void __aeabi_memset4(TAny* aTrg, unsigned int aLength, TInt aValue);
//   void __aeabi_memset(TAny* aTrg, unsigned int aLength, TInt aValue);

extern "C" __NAKED__ void make_mem_functions_call_euser_versions()
        {
        asm(".global __aeabi_memset8    ");
        asm("__aeabi_memset8:           ");
        asm(".global __aeabi_memset4    ");
        asm("__aeabi_memset4:           ");
        asm(".global __aeabi_memset     ");
        asm("__aeabi_memset:            ");
        asm("   mov             r3, r1  ");
        asm("   mov             r1, r2  ");
        asm("   mov             r2, r3  ");
        asm("   b               memset  ");

        asm(".global __aeabi_memclr8    ");
        asm("__aeabi_memclr8:           ");
        asm(".global __aeabi_memclr4    ");
        asm("__aeabi_memclr4:           ");
        asm(".global __aeabi_memclr     ");
        asm("__aeabi_memclr:            ");
        asm("   b               memclr  ");
        
        asm(".global __aeabi_memcpy8    ");
        asm("__aeabi_memcpy8:           ");
        asm(".global __aeabi_memcpy4    ");
        asm("__aeabi_memcpy4:           ");
        asm(".global __aeabi_memcpy     ");
        asm("__aeabi_memcpy:            ");
        asm("   b               memcpy  ");
        
        asm(".global __aeabi_memmove8   ");
        asm("__aeabi_memmove8:          ");
        asm(".global __aeabi_memmove4   ");
        asm("__aeabi_memmove4:          ");
        asm(".global __aeabi_memmove    ");
        asm("__aeabi_memmove:           ");
        asm("   b               memmove ");
        }