MdePkg/BaseMemoryLibOptDxe: replace deprecated uses of IT blocks

The ARM architecture version 8 deprecates all uses of the IT instruction
except cases where it is followed by a single narrow instruction. So
replace any occurrences with equivalent sequences that adhere to the
new rules.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Ard Biesheuvel
2016-09-26 15:55:05 -07:00
parent c4f637077e
commit eab2678815
5 changed files with 33 additions and 27 deletions

View File

@@ -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