]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/EbcDxe/X64/EbcLowLevel.asm
1) Fix GCC version EBC interpreter bug.
[mirror_edk2.git] / MdeModulePkg / Universal / EbcDxe / X64 / EbcLowLevel.asm
index c2e91ff117a953e5b32e540d781c50de989c63bc..19fc35b0fc403f82901963babbb066d346eef00e 100644 (file)
@@ -3,7 +3,7 @@
 ;    This code provides low level routines that support the Virtual Machine.\r
 ;    for option ROMs.\r
 ;  \r
-;  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+;  Copyright (c) 2006 - 2011, 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
 ; Equate files needed.\r
 ;---------------------------------------------------------------------------\r
 \r
-text SEGMENT\r
+.CODE\r
 \r
-;---------------------------------------------------------------------------\r
-;;GenericPostSegment      SEGMENT USE16\r
-;---------------------------------------------------------------------------\r
+CopyMem  PROTO  Destination:PTR DWORD, Source:PTR DWORD, Count:DWORD\r
 \r
 ;****************************************************************************\r
 ; EbcLLCALLEX\r
@@ -38,11 +36,7 @@ text SEGMENT
 ;\r
 ; Destroys no working registers.\r
 ;****************************************************************************\r
-; VOID EbcLLCALLEXNative(UINTN FuncAddr, UINTN NewStackPointer, VOID *FramePtr)\r
-\r
-CopyMem  PROTO  Destination:PTR DWORD, Source:PTR DWORD, Count:DWORD\r
-\r
-\r
+; INT64 EbcLLCALLEXNative(UINTN FuncAddr, UINTN NewStackPointer, VOID *FramePtr)\r
 EbcLLCALLEXNative        PROC    PUBLIC\r
       push   rbp\r
       push   rbx\r
@@ -92,54 +86,10 @@ EbcLLCALLEXNative    ENDP
 ;     The contents of the register in which the entry point is passed.\r
 ;\r
 EbcLLGetEbcEntryPoint        PROC    PUBLIC\r
+    ; The EbcEntryPoint is saved to R10.\r
     mov  rax, r10\r
     ret\r
 EbcLLGetEbcEntryPoint    ENDP\r
 \r
-;/*++\r
-;\r
-;Routine Description:\r
-;\r
-;  Return the caller's value of the stack pointer.\r
-;\r
-;Arguments:\r
-;\r
-;  None.\r
-;\r
-;Returns:\r
-;\r
-;  The current value of the stack pointer for the caller. We\r
-;  adjust it by 4 here because when they called us, the return address\r
-;  is put on the stack, thereby lowering it by 4 bytes.\r
-;\r
-;--*/\r
-\r
-; UINTN EbcLLGetStackPointer()\r
-EbcLLGetStackPointer        PROC    PUBLIC\r
-    mov    rax, rsp      ; get current stack pointer\r
-    ; Stack adjusted by this much when we were called,\r
-    ; For this function, it's 4.\r
-    add   rax, 4\r
-    ret\r
-EbcLLGetStackPointer    ENDP\r
-\r
-; UINT64 EbcLLGetReturnValue(VOID);\r
-; Routine Description:\r
-;   When EBC calls native, on return the VM has to stuff the return\r
-;   value into a VM register. It's assumed here that the value is still\r
-;    in the register, so simply return and the caller should get the\r
-;   return result properly.\r
-;\r
-; Arguments:\r
-;     None.\r
-;\r
-; Returns:\r
-;     The unmodified value returned by the native code.\r
-;\r
-EbcLLGetReturnValue   PROC    PUBLIC\r
-    ret\r
-EbcLLGetReturnValue    ENDP\r
-\r
-text  ENDS\r
 END\r
 \r