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:
@@ -73,15 +73,17 @@ ASM_PFX(InternalMemZeroMem):
|
||||
cmp r4, #4 // between 4 and 15 bytes?
|
||||
blt 4f
|
||||
cmp r4, #8 // between 8 and 15 bytes?
|
||||
str r2, [lr, #-16] // overlapping store of 4 + (4 + 4) + 4 bytes
|
||||
itt gt
|
||||
strgt r3, [lr, #-12]
|
||||
strgt r2, [r1]
|
||||
sub r4, lr, #16
|
||||
str r2, [r4] // overlapping store of 4 + (4 + 4) + 4 bytes
|
||||
it gt
|
||||
strgt.n r3, [r4, #4]
|
||||
it gt
|
||||
strgt.n r2, [r1]
|
||||
str r3, [r1, #4]
|
||||
pop {r4, pc}
|
||||
|
||||
4: cmp r4, #2 // 2 or 3 bytes?
|
||||
strb r2, [lr, #-16] // store 1 byte
|
||||
it ge
|
||||
strhge r2, [r1, #6] // store 2 bytes
|
||||
strhge.n r2, [r1, #6] // store 2 bytes
|
||||
pop {r4, pc}
|
||||
|
Reference in New Issue
Block a user