Ia32/WriteMsr64.asm | INTEL \r
Ia32/SwapBytes64.nasm| INTEL\r
Ia32/SwapBytes64.asm | INTEL \r
+ Ia32/SetJump.nasm| INTEL\r
Ia32/SetJump.asm | INTEL \r
Ia32/RRotU64.asm | INTEL \r
Ia32/RShiftU64.asm | INTEL \r
Ia32/CpuIdEx.S | GCC \r
Ia32/CpuId.S | GCC \r
Ia32/LongJump.S | GCC \r
+ Ia32/SetJump.nasm| GCC\r
Ia32/SetJump.S | GCC \r
Ia32/SwapBytes64.nasm| GCC\r
Ia32/SwapBytes64.S | GCC \r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+; This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution. The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php.\r
+;\r
+; 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:\r
+;\r
+; SetJump.Asm\r
+;\r
+; Abstract:\r
+;\r
+; Implementation of SetJump() on IA-32.\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+ SECTION .text\r
+\r
+extern ASM_PFX(InternalAssertJumpBuffer)\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; SetJump (\r
+; OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer\r
+; );\r
+;------------------------------------------------------------------------------\r
+global ASM_PFX(SetJump)\r
+ASM_PFX(SetJump):\r
+ push DWORD [esp + 4]\r
+ call ASM_PFX(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 ; eip value to restore in LongJump\r
+ xor eax, eax\r
+ jmp ecx\r
+\r