X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FBaseLib%2FX86PatchInstruction.c;fp=MdePkg%2FLibrary%2FBaseLib%2FX86PatchInstruction.c;h=116a50199edaf7ad9dff1b721cb4fc55e189fff5;hp=fc70a352d315c6d56ce00c68cd30c6e56b69057c;hb=2f88bd3a1296c522317f1c21377876de63de5be7;hpb=1436aea4d5707e672672a11bda72be2c63c936c3 diff --git a/MdePkg/Library/BaseLib/X86PatchInstruction.c b/MdePkg/Library/BaseLib/X86PatchInstruction.c index fc70a352d3..116a50199e 100644 --- a/MdePkg/Library/BaseLib/X86PatchInstruction.c +++ b/MdePkg/Library/BaseLib/X86PatchInstruction.c @@ -46,9 +46,9 @@ VOID EFIAPI PatchInstructionX86 ( - OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd, - IN UINT64 PatchValue, - IN UINTN ValueSize + OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd, + IN UINT64 PatchValue, + IN UINTN ValueSize ) { // @@ -58,26 +58,26 @@ PatchInstructionX86 ( ASSERT ((UINTN)InstructionEnd > ValueSize); switch (ValueSize) { - case 1: - ASSERT (PatchValue <= MAX_UINT8); - *((UINT8 *)(UINTN)InstructionEnd - 1) = (UINT8)PatchValue; - break; - - case 2: - ASSERT (PatchValue <= MAX_UINT16); - WriteUnaligned16 ((UINT16 *)(UINTN)InstructionEnd - 1, (UINT16)PatchValue); - break; - - case 4: - ASSERT (PatchValue <= MAX_UINT32); - WriteUnaligned32 ((UINT32 *)(UINTN)InstructionEnd - 1, (UINT32)PatchValue); - break; - - case 8: - WriteUnaligned64 ((UINT64 *)(UINTN)InstructionEnd - 1, PatchValue); - break; - - default: - ASSERT (FALSE); + case 1: + ASSERT (PatchValue <= MAX_UINT8); + *((UINT8 *)(UINTN)InstructionEnd - 1) = (UINT8)PatchValue; + break; + + case 2: + ASSERT (PatchValue <= MAX_UINT16); + WriteUnaligned16 ((UINT16 *)(UINTN)InstructionEnd - 1, (UINT16)PatchValue); + break; + + case 4: + ASSERT (PatchValue <= MAX_UINT32); + WriteUnaligned32 ((UINT32 *)(UINTN)InstructionEnd - 1, (UINT32)PatchValue); + break; + + case 8: + WriteUnaligned64 ((UINT64 *)(UINTN)InstructionEnd - 1, PatchValue); + break; + + default: + ASSERT (FALSE); } }