summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-09-26 15:55:05 -0700
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-09-27 09:12:14 -0700
commiteab26788156436a549610a299d2e297c22043e70 (patch)
tree6b62426d589a9f3c27a4217348a5ac8cab2b2c9b /MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S
parentc4f637077eb4504aa0109aac9983dfe85e5b2afb (diff)
downloadedk2-platforms-eab26788156436a549610a299d2e297c22043e70.tar.xz
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>
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S')
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S31
1 files changed, 17 insertions, 14 deletions
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S
index fb5293befc..195a0b23f7 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S
@@ -65,16 +65,18 @@ memcopy_check_optim_default:
// Check if we can use an optimized path ((length >= 32) && destination word-aligned && source word-aligned) for the memcopy (optimized path if r0 == 1)
tst r0, #0xF
it ne
- movne r0, #0
+ movne.n r0, #0
bne memcopy_default
tst r1, #0xF
- ite ne
- movne r3, #0
- moveq r3, #1
+ it ne
+ movne.n r3, #0
+ it eq
+ moveq.n r3, #1
cmp r2, #31
- ite ls
- movls r0, #0
- andhi r0, r3, #1
+ it ls
+ movls.n r0, #0
+ bls memcopy_default
+ and r0, r3, #1
b memcopy_default
memcopy_check_optim_overlap:
@@ -84,15 +86,16 @@ memcopy_check_optim_overlap:
// Are we in the optimized case ((length >= 32) && dest_end word-aligned && source_end word-aligned)
cmp r2, #31
- ite ls
- movls r0, #0
- movhi r0, #1
+ it ls
+ movls.n r0, #0
+ it hi
+ movhi.n r0, #1
tst r10, #0xF
it ne
- movne r0, #0
+ movne.n r0, #0
tst r14, #0xF
it ne
- movne r0, #0
+ movne.n r0, #0
b memcopy_overlapped
memcopy_overlapped_non_optim:
@@ -123,7 +126,7 @@ memcopy_overlapped:
// If length is less than 32 then disable optim
it ls
- movls r0, #0
+ movls.n r0, #0
cmp r12, #0
@@ -157,7 +160,7 @@ memcopy_default_loop:
// If length is less than 32 then disable optim
it ls
- movls r0, #0
+ movls.n r0, #0
cmp r12, #0