]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix bug in EBC thunk for X64 that appears when higher levels of compiler optimization...
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 17 Jul 2009 22:56:34 +0000 (22:56 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 17 Jul 2009 22:56:34 +0000 (22:56 +0000)
This is a temporary fix that should for for most tool chains.  A more complete fix will be required to guarantee compatibility with all tool chains.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8970 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/EbcDxe/X64/EbcLowLevel.asm
MdeModulePkg/Universal/EbcDxe/X64/EbcSupport.c

index 6741405cbcc68b4b110def084860241a2e587dee..2f968cac2fcbc82b466b3195f44c0c532a6e2974 100644 (file)
@@ -92,6 +92,7 @@ EbcLLCALLEXNative    ENDP
 ;     The contents of the register in which the entry point is passed.\r
 ;\r
 EbcLLGetEbcEntryPoint        PROC    PUBLIC\r
+    mov  rax, r10\r
     ret\r
 EbcLLGetEbcEntryPoint    ENDP\r
 \r
index 3f84bcc49633e9047ba7e3ce79d70538baa059c7..6c0428d9cc94a0b00f6b79f606b93494c86d9e46 100644 (file)
@@ -412,14 +412,14 @@ EbcCreateThunks (
 \r
   //\r
   // Add code bytes to load up a processor register with the EBC entry point.\r
-  // mov rax, 123456789abcdef0h  => 48 B8 F0 DE BC 9A 78 56 34 12\r
+  // mov r10, 123456789abcdef0h  => 48 B8 F0 DE BC 9A 78 56 34 12\r
   // The first 8 bytes of the thunk entry is the address of the EBC\r
   // entry point.\r
   //\r
-  *Ptr = 0x48;\r
+  *Ptr = 0x49;\r
   Ptr++;\r
   Size--;\r
-  *Ptr = 0xB8;\r
+  *Ptr = 0xBA;\r
   Ptr++;\r
   Size--;\r
   Addr = (UINT64) EbcEntryPoint;\r