]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S
MdePkg/BaseMemoryLibOptDxe ARM: fix Thumb-2 bug in ScanMem()
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibOptDxe / Arm / ScanMem.S
index dc0e74e8657c49066f620248e3e3beaaae03c1e5..1c269547b07263a93047c32924af1109c8d4b417 100644 (file)
@@ -134,11 +134,12 @@ ASM_PFX(InternalMemScanMem8):
     bne     61f\r
     adds    r0, r0, #1\r
     tst     r5, #CHARTSTMASK(1)     // 2nd character\r
-    ittt    eq\r
-    addeq   r0, r0 ,#1\r
-    tsteq   r5, #(3 << 15)          // 2nd & 3rd character\r
+    bne     61f\r
+    add   r0, r0 ,#1\r
+    tst     r5, #(3 << 15)          // 2nd & 3rd character\r
     // If not the 3rd must be the last one\r
-    addeq   r0, r0, #1\r
+    it      eq\r
+    addeq.n r0, r0, #1\r
 \r
 61:\r
     pop     {r4-r7}\r