#\r
# Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>\r
#\r
-# This program and the accompanying materials are licensed and made available\r
-# under the terms and conditions of the BSD License which accompanies this\r
-# distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
#------------------------------------------------------------------------------\r
\r
.thumb\r
.syntax unified\r
.align 5\r
+ .type ASM_PFX(InternalMemSetMem16), %function\r
ASM_GLOBAL ASM_PFX(InternalMemSetMem16)\r
ASM_PFX(InternalMemSetMem16):\r
uxth r2, r2\r
orr r2, r2, r2, lsl #16\r
b 0f\r
\r
+ .type ASM_PFX(InternalMemSetMem32), %function\r
ASM_GLOBAL ASM_PFX(InternalMemSetMem32)\r
ASM_PFX(InternalMemSetMem32):\r
lsl r1, r1, #2\r
b 0f\r
\r
+ .type ASM_PFX(InternalMemSetMem64), %function\r
ASM_GLOBAL ASM_PFX(InternalMemSetMem64)\r
ASM_PFX(InternalMemSetMem64):\r
lsl r1, r1, #3\r
b 1f\r
\r
.align 5\r
+ .type ASM_PFX(InternalMemSetMem), %function\r
ASM_GLOBAL ASM_PFX(InternalMemSetMem)\r
ASM_PFX(InternalMemSetMem):\r
uxtb r2, r2\r
orr r2, r2, r2, lsl #16\r
b 0f\r
\r
+ .type ASM_PFX(InternalMemZeroMem), %function\r
ASM_GLOBAL ASM_PFX(InternalMemZeroMem)\r
ASM_PFX(InternalMemZeroMem):\r
movs r2, #0\r
cmp r4, #4 // between 4 and 15 bytes?\r
blt 4f\r
cmp r4, #8 // between 8 and 15 bytes?\r
- str r2, [lr, #-16] // overlapping store of 4 + (4 + 4) + 4 bytes\r
- itt gt\r
- strgt r3, [lr, #-12]\r
- strgt r2, [r1]\r
+ sub r4, lr, #16\r
+ str r2, [r4] // overlapping store of 4 + (4 + 4) + 4 bytes\r
+ it gt\r
+ strgt.n r3, [r4, #4]\r
+ it gt\r
+ strgt.n r2, [r1]\r
str r3, [r1, #4]\r
pop {r4, pc}\r
\r
4: cmp r4, #2 // 2 or 3 bytes?\r
strb r2, [lr, #-16] // store 1 byte\r
it ge\r
- strhge r2, [r1, #6] // store 2 bytes\r
+ strhge.n r2, [r1, #6] // store 2 bytes\r
pop {r4, pc}\r