2014-08-19 15:29:52 +02:00
|
|
|
//------------------------------------------------------------------------------
|
2013-01-25 12:28:06 +01:00
|
|
|
//
|
2014-11-11 01:52:11 +01:00
|
|
|
// Copyright (c) 2011-2014, ARM Limited. All rights reserved.
|
2013-01-25 12:28:06 +01:00
|
|
|
//
|
2019-04-04 01:03:18 +02:00
|
|
|
// SPDX-License-Identifier: BSD-2-Clause-Patent
|
2013-01-25 12:28:06 +01:00
|
|
|
//
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-03 21:28:02 +01:00
|
|
|
INCLUDE AsmMacroExport.inc
|
2013-01-25 12:28:06 +01:00
|
|
|
|
|
|
|
;
|
|
|
|
;VOID
|
|
|
|
;EFIAPI
|
|
|
|
;__aeabi_memmove (
|
|
|
|
; IN VOID *Destination,
|
|
|
|
; IN CONST VOID *Source,
|
|
|
|
; IN UINT32 Size
|
|
|
|
; );
|
|
|
|
;
|
2015-12-03 21:28:02 +01:00
|
|
|
RVCT_ASM_EXPORT __aeabi_memmove
|
2013-01-25 12:28:06 +01:00
|
|
|
CMP r2, #0
|
2014-11-11 01:52:11 +01:00
|
|
|
BXEQ lr
|
2013-01-25 12:28:06 +01:00
|
|
|
CMP r0, r1
|
2014-11-11 01:52:11 +01:00
|
|
|
BXEQ lr
|
2013-01-25 12:28:06 +01:00
|
|
|
BHI memmove_backward
|
|
|
|
|
|
|
|
memmove_forward
|
|
|
|
LDRB r3, [r1], #1
|
|
|
|
STRB r3, [r0], #1
|
|
|
|
SUBS r2, r2, #1
|
2014-11-11 01:52:11 +01:00
|
|
|
BNE memmove_forward
|
|
|
|
BX lr
|
2013-01-25 12:28:06 +01:00
|
|
|
|
|
|
|
memmove_backward
|
|
|
|
add r0, r2
|
|
|
|
add r1, r2
|
|
|
|
memmove_backward_loop
|
2014-11-11 01:52:11 +01:00
|
|
|
LDRB r3, [r1, #-1]!
|
|
|
|
STRB r3, [r0, #-1]!
|
|
|
|
SUBS r2, r2, #1
|
|
|
|
BNE memmove_backward_loop
|
|
|
|
BX lr
|
2013-01-25 12:28:06 +01:00
|
|
|
|
|
|
|
END
|