]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: Update DebugSupportDxe to pass XCODE5 build
authorLiming Gao <liming.gao@intel.com>
Wed, 10 Jan 2018 15:24:28 +0000 (23:24 +0800)
committerLiming Gao <liming.gao@intel.com>
Tue, 16 Jan 2018 15:30:12 +0000 (23:30 +0800)
XCODE5 doesn't support absolute addressing in the assembly code.
This change uses lea instruction to get the address.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.nasm

index 134842a68a2b73bb89408b2943d420ab81fa7b8f..31d8b0a717f11984f7284b263f87e40490dd3001 100644 (file)
@@ -1,7 +1,7 @@
 ;/** @file\r
 ;  Low level x64 routines used by the debug support driver.\r
 ;\r
 ;/** @file\r
 ;  Low level x64 routines used by the debug support driver.\r
 ;\r
-;  Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+;  Copyright (c) 2007 - 2018, 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
 ;  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
@@ -226,7 +226,7 @@ ASM_PFX(CommonIdtEntry):
                 pop     rax\r
                 add     rsp, 8                           ; pop vector number\r
                 mov     [AppRsp], rsp                    ; save stack top\r
                 pop     rax\r
                 add     rsp, 8                           ; pop vector number\r
                 mov     [AppRsp], rsp                    ; save stack top\r
-                mov     rsp, DebugStackBegin             ; switch to debugger stack\r
+                lea     rsp, [DebugStackBegin]           ; switch to debugger stack\r
                 sub     rsp, 8                           ; leave space for vector number\r
 \r
 ;; UINT64  Rdi, Rsi, Rbp, Rsp, Rbx, Rdx, Rcx, Rax;\r
                 sub     rsp, 8                           ; leave space for vector number\r
 \r
 ;; UINT64  Rdi, Rsi, Rbp, Rsp, Rbx, Rdx, Rcx, Rax;\r
@@ -529,7 +529,7 @@ Chain:
                 push    rbx\r
                 mov     rax, cs\r
                 push    rax\r
                 push    rbx\r
                 mov     rax, cs\r
                 push    rax\r
-                mov     rax, PhonyIretq\r
+                lea     rax, [PhonyIretq]\r
                 push    rax\r
                 iretq\r
 PhonyIretq:\r
                 push    rax\r
                 iretq\r
 PhonyIretq:\r