]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/SetJump.asm
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / SetJump.asm
index 41277cd20f5422a11e9dae93d9c6f1b9f5efca6d..4b7b40c47a4b2faf89ec972c2e4f60d153eba3ce 100644 (file)
 ;------------------------------------------------------------------------------\r
 \r
     .386\r
-    .model  flat\r
+    .model  flat,C\r
     .code\r
 \r
-_SetJump    PROC\r
+InternalAssertJumpBuffer    PROTO   C\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; SetJump (\r
+;   OUT     BASE_LIBRARY_JUMP_BUFFER  *JumpBuffer\r
+;   );\r
+;------------------------------------------------------------------------------\r
+SetJump     PROC\r
+    push    [esp + 4]\r
+    call    InternalAssertJumpBuffer    ; To validate JumpBuffer\r
     pop     ecx\r
+    pop     ecx                         ; ecx <- return address\r
     mov     edx, [esp]\r
     mov     [edx], ebx\r
     mov     [edx + 4], esi\r
     mov     [edx + 8], edi\r
     mov     [edx + 12], ebp\r
     mov     [edx + 16], esp\r
-    mov     [edx + 20], ecx\r
+    mov     [edx + 20], ecx             ; eip value to restore in LongJump\r
     xor     eax, eax\r
     jmp     ecx\r
-_SetJump    ENDP\r
+SetJump     ENDP\r
 \r
     END\r