]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/SetJump.c
Updated to support compiler intrinsics properly. I had to comment out some of the...
[mirror_edk2.git] / MdePkg / Library / BaseLib / SetJump.c
index ea70641ec2500f68cb971ffa1bd91ac53fd22392..92208f60c7f52d7ce428b76c2f4d7d40d4f51704 100644 (file)
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-  Module Name:  SetJumpLongJump.c\r
+  Module Name:  SetJump.c\r
 \r
 **/\r
 \r
+//\r
+// Include common header file for this module.\r
+//\r
+#include "CommonHeader.h"\r
+\r
+#include "BaseLibInternals.h"\r
+\r
+/**\r
+  Worker function that checks ASSERT condition for JumpBuffer\r
+\r
+  Checks ASSERT condition for JumpBuffer.\r
+\r
+  If JumpBuffer is NULL, then ASSERT().\r
+  If JumpBuffer is not aligned on a BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT\r
+  boundary, then ASSERT().\r
+\r
+  @param  JumpBuffer    A pointer to CPU context buffer.\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 InternalAssertJumpBuffer (\r
@@ -22,7 +41,5 @@ InternalAssertJumpBuffer (
 {\r
   ASSERT (JumpBuffer != NULL);\r
 \r
-#ifdef MDE_CPU_IPF\r
-  ASSERT (((UINTN)JumpBuffer & 0xf) == 0);\r
-#endif\r
+  ASSERT (((UINTN)JumpBuffer & ((BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT - 1) >> 8)) == 0);\r
 }\r