kernel/eka/compsupp/rvct2_2/aeabimem.cia
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 07 Jan 2010 13:38:45 +0200
changeset 10 36bfc973b146
parent 9 96e5fb8b040d
child 11 329ab0095843
permissions -rw-r--r--
Revision: 201001 Kit: 201001

/*
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "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: 
*
*/


#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		  ");
	}