VOID\r
EFIAPI\r
PatchInstructionX86 (\r
- OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd,\r
- IN UINT64 PatchValue,\r
- IN UINTN ValueSize\r
+ OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd,\r
+ IN UINT64 PatchValue,\r
+ IN UINTN ValueSize\r
)\r
{\r
//\r
ASSERT ((UINTN)InstructionEnd > ValueSize);\r
\r
switch (ValueSize) {\r
- case 1:\r
- ASSERT (PatchValue <= MAX_UINT8);\r
- *((UINT8 *)(UINTN)InstructionEnd - 1) = (UINT8)PatchValue;\r
- break;\r
-\r
- case 2:\r
- ASSERT (PatchValue <= MAX_UINT16);\r
- WriteUnaligned16 ((UINT16 *)(UINTN)InstructionEnd - 1, (UINT16)PatchValue);\r
- break;\r
-\r
- case 4:\r
- ASSERT (PatchValue <= MAX_UINT32);\r
- WriteUnaligned32 ((UINT32 *)(UINTN)InstructionEnd - 1, (UINT32)PatchValue);\r
- break;\r
-\r
- case 8:\r
- WriteUnaligned64 ((UINT64 *)(UINTN)InstructionEnd - 1, PatchValue);\r
- break;\r
-\r
- default:\r
- ASSERT (FALSE);\r
+ case 1:\r
+ ASSERT (PatchValue <= MAX_UINT8);\r
+ *((UINT8 *)(UINTN)InstructionEnd - 1) = (UINT8)PatchValue;\r
+ break;\r
+\r
+ case 2:\r
+ ASSERT (PatchValue <= MAX_UINT16);\r
+ WriteUnaligned16 ((UINT16 *)(UINTN)InstructionEnd - 1, (UINT16)PatchValue);\r
+ break;\r
+\r
+ case 4:\r
+ ASSERT (PatchValue <= MAX_UINT32);\r
+ WriteUnaligned32 ((UINT32 *)(UINTN)InstructionEnd - 1, (UINT32)PatchValue);\r
+ break;\r
+\r
+ case 8:\r
+ WriteUnaligned64 ((UINT64 *)(UINTN)InstructionEnd - 1, PatchValue);\r
+ break;\r
+\r
+ default:\r
+ ASSERT (FALSE);\r
}\r
}\r