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>
;/** @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
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
push rbx\r
mov rax, cs\r
push rax\r
push rbx\r
mov rax, cs\r
push rax\r
+ lea rax, [PhonyIretq]\r
push rax\r
iretq\r
PhonyIretq:\r
push rax\r
iretq\r
PhonyIretq:\r