Home | History | Annotate | Download | only in X64
      1 ;------------------------------------------------------------------------------
      2 ;
      3 ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
      4 ; This program and the accompanying materials
      5 ; are licensed and made available under the terms and conditions of the BSD License
      6 ; which accompanies this distribution.  The full text of the license may be found at
      7 ; http://opensource.org/licenses/bsd-license.php.
      8 ;
      9 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     10 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     11 ;
     12 ; Module Name:
     13 ;
     14 ;   LongJump.Asm
     15 ;
     16 ; Abstract:
     17 ;
     18 ;   Implementation of _LongJump() on x64.
     19 ;
     20 ;------------------------------------------------------------------------------
     21 
     22     .code
     23 
     24 ;------------------------------------------------------------------------------
     25 ; VOID
     26 ; EFIAPI
     27 ; InternalLongJump (
     28 ;   IN      BASE_LIBRARY_JUMP_BUFFER  *JumpBuffer,
     29 ;   IN      UINTN                     Value
     30 ;   );
     31 ;------------------------------------------------------------------------------
     32 InternalLongJump    PROC
     33     mov     rbx, [rcx]
     34     mov     rsp, [rcx + 8]
     35     mov     rbp, [rcx + 10h]
     36     mov     rdi, [rcx + 18h]
     37     mov     rsi, [rcx + 20h]
     38     mov     r12, [rcx + 28h]
     39     mov     r13, [rcx + 30h]
     40     mov     r14, [rcx + 38h]
     41     mov     r15, [rcx + 40h]
     42     ; load non-volatile fp registers
     43     ldmxcsr [rcx + 50h]
     44     movdqu  xmm6,  [rcx + 58h]
     45     movdqu  xmm7,  [rcx + 68h]
     46     movdqu  xmm8,  [rcx + 78h]
     47     movdqu  xmm9,  [rcx + 88h]
     48     movdqu  xmm10, [rcx + 98h]
     49     movdqu  xmm11, [rcx + 0A8h]
     50     movdqu  xmm12, [rcx + 0B8h]
     51     movdqu  xmm13, [rcx + 0C8h]
     52     movdqu  xmm14, [rcx + 0D8h]
     53     movdqu  xmm15, [rcx + 0E8h]
     54     mov     rax, rdx               ; set return value
     55     jmp     qword ptr [rcx + 48h]
     56 InternalLongJump    ENDP
     57 
     58     END
     59