]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseMemoryLibOptDxe/Arm/SetMem.S
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibOptDxe / Arm / SetMem.S
index add04443b2e9946dc48875693e8cd4180f74e391..f6797004effc0a549baa779f4bdc6491c5a87b95 100644 (file)
@@ -2,13 +2,7 @@
 #\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
@@ -16,6 +10,7 @@
     .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
@@ -23,17 +18,20 @@ ASM_PFX(InternalMemSetMem16):
     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
@@ -41,6 +39,7 @@ ASM_PFX(InternalMemSetMem):
     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
@@ -73,15 +72,17 @@ ASM_PFX(InternalMemZeroMem):
     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