From: mdkinney Date: Tue, 18 Aug 2009 21:00:48 +0000 (+0000) Subject: Address an ARM compatibility issue by converting loops that were being optimized... X-Git-Tag: edk2-stable201903~17209 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=6f0dc9aeffe9d512b00d7128b9a7985dbd3b7576 Address an ARM compatibility issue by converting loops that were being optimized away into SetMem() calls. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9110 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c index e3c5d0c45e..80baee0923 100644 --- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c +++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c @@ -1,7 +1,8 @@ /** @file UEFI Decompress Library implementation refer to UEFI specification. - Copyright (c) 2006 - 2008, Intel Corporation + Copyright (c) 2006 - 2008, Intel Corporation
+ Portions Copyright (c) 2008-2009 Apple Inc.
All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -337,9 +338,7 @@ ReadPTLen ( // CharC = (UINT16) GetBits (Sd, nbit); - for (Index = 0; Index < 256; Index++) { - Sd->mPTTable[Index] = CharC; - } + SetMem16 (&Sd->mPTTable[0] , sizeof (Sd->mPTTable), CharC); SetMem (Sd->mPTLen, nn, 0); @@ -418,10 +417,7 @@ ReadCLen ( CharC = (UINT16) GetBits (Sd, CBIT); SetMem (Sd->mCLen, NC, 0); - - for (Index = 0; Index < 4096; Index++) { - Sd->mCTable[Index] = CharC; - } + SetMem16 (&Sd->mCTable[0], sizeof (Sd->mCTable), CharC); return ; }