MdePkg/BaseMemoryLibOptDxe ARM AARCH64: fix thinko in SetMem##
The new InternalMemSetMem##() implementations for ARM and AARCH64 in BaseMemoryLibOptDxe fail to take into account that the 'length' argument is not in bytes, but in number of items to be copied. So multiply by the item size before proceeding. Reported-by: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
@@ -78,16 +78,19 @@
|
||||
ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
|
||||
ASM_PFX(InternalMemSetMem16):
|
||||
dup v0.8H, valw
|
||||
lsl count, count, #1
|
||||
b 0f
|
||||
|
||||
ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
|
||||
ASM_PFX(InternalMemSetMem32):
|
||||
dup v0.4S, valw
|
||||
lsl count, count, #2
|
||||
b 0f
|
||||
|
||||
ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
|
||||
ASM_PFX(InternalMemSetMem64):
|
||||
dup v0.2D, val
|
||||
lsl count, count, #3
|
||||
b 0f
|
||||
|
||||
ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
|
||||
|
Reference in New Issue
Block a user