diff options
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S')
-rw-r--r-- | MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S index 1c269547b0..5dcf153a61 100644 --- a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S +++ b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S @@ -123,11 +123,12 @@ ASM_PFX(InternalMemScanMem8): 60: // We're here because the fast path found a hit - now we have to track down exactly which word it was
// r0 points to the start of the double word after the one that was tested
// r5 has the 00/ff pattern for the first word, r6 has the chained value
+ subs r0, r0, #3
cmp r5, #0
- itte eq
- moveq r5, r6 // the end is in the 2nd word
- subeq r0, r0, #3 // Points to 2nd byte of 2nd word
- subne r0, r0, #7 // or 2nd byte of 1st word
+ it eq
+ moveq.n r5, r6 // the end is in the 2nd word
+ it ne
+ subne.n r0, r0, #4 // or 2nd byte of 1st word
// r0 currently points to the 3rd byte of the word containing the hit
tst r5, #CHARTSTMASK(0) // 1st character
|