os/kernelhwsrv/kernel/eka/compsupp/rvct2_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.
sl@0
     1
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "ARM EABI LICENCE.txt"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// in kernel/eka/compsupp.
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#include <e32cmn.h>
sl@0
    17
sl@0
    18
// Call our implementations of memcpy/move/set/clr rather than the ARM supplied
sl@0
    19
// ones.
sl@0
    20
// 
sl@0
    21
// Note that the AEABI switched the order of arg2 and arg3 to save an intruction
sl@0
    22
// when calling 'memset' from 'memclr'.
sl@0
    23
//
sl@0
    24
// Prototypes are:
sl@0
    25
//   void __aeabi_memset8(TAny* aTrg, unsigned int aLength, TInt aValue);
sl@0
    26
//   void __aeabi_memset4(TAny* aTrg, unsigned int aLength, TInt aValue);
sl@0
    27
//   void __aeabi_memset(TAny* aTrg, unsigned int aLength, TInt aValue);
sl@0
    28
sl@0
    29
extern "C" __NAKED__ void make_mem_functions_call_euser_versions()
sl@0
    30
	{
sl@0
    31
	asm(".global __aeabi_memset8  ");
sl@0
    32
	asm("__aeabi_memset8: 		  ");
sl@0
    33
	asm(".global __aeabi_memset4  ");
sl@0
    34
	asm("__aeabi_memset4: 		  ");
sl@0
    35
	asm(".global __aeabi_memset   ");
sl@0
    36
	asm("__aeabi_memset: 		  ");
sl@0
    37
	asm("	mov		r3, r1		  ");
sl@0
    38
	asm("	mov		r1, r2		  ");
sl@0
    39
	asm("	mov		r2, r3		  ");
sl@0
    40
	asm("	b		memset		  ");
sl@0
    41
sl@0
    42
	asm(".global __aeabi_memclr8  ");
sl@0
    43
	asm("__aeabi_memclr8: 		  ");
sl@0
    44
	asm(".global __aeabi_memclr4  ");
sl@0
    45
	asm("__aeabi_memclr4: 		  ");
sl@0
    46
	asm(".global __aeabi_memclr   ");
sl@0
    47
	asm("__aeabi_memclr: 		  ");
sl@0
    48
	asm("	b		memclr		  ");
sl@0
    49
	
sl@0
    50
	asm(".global __aeabi_memcpy8  ");
sl@0
    51
	asm("__aeabi_memcpy8: 		  ");
sl@0
    52
	asm(".global __aeabi_memcpy4  ");
sl@0
    53
	asm("__aeabi_memcpy4: 		  ");
sl@0
    54
	asm(".global __aeabi_memcpy   ");
sl@0
    55
	asm("__aeabi_memcpy: 		  ");
sl@0
    56
	asm("	b		memcpy		  ");
sl@0
    57
	
sl@0
    58
	asm(".global __aeabi_memmove8 ");
sl@0
    59
	asm("__aeabi_memmove8: 		  ");
sl@0
    60
	asm(".global __aeabi_memmove4 ");
sl@0
    61
	asm("__aeabi_memmove4: 		  ");
sl@0
    62
	asm(".global __aeabi_memmove  ");
sl@0
    63
	asm("__aeabi_memmove: 		  ");
sl@0
    64
	asm("	b		memmove		  ");
sl@0
    65
	}