SourceLevelDebugPkg: DebugAgentLib: Fix clang/Xcode 5 compile/link errors

Move ExceptionStubHeaderSize from 16 to 32 bits to work around clang relocation limitation. Use movw, not move for 32-bit segment register operations. 

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anderw Fish <afish@apple.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>




git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16067 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Anderw Fish 2014-09-09 06:27:45 +00:00 committed by vanjeff
parent 41f80fbd99
commit 19ee4a9049
5 changed files with 9 additions and 9 deletions

View File

@ -67,7 +67,7 @@
extern UINTN Exception0Handle;
extern UINTN TimerInterruptHandle;
extern UINT16 ExceptionStubHeaderSize;
extern UINT32 ExceptionStubHeaderSize;
extern BOOLEAN mSkipBreakpoint;
extern EFI_VECTOR_HANDOFF_INFO mVectorHandoffInfoDebugAgent[];
extern UINTN mVectorHandoffInfoCount;

View File

@ -33,7 +33,7 @@ ASM_GLOBAL ASM_PFX(CommonEntry)
.data
ASM_PFX(ExceptionStubHeaderSize): .word ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle)
ASM_PFX(ExceptionStubHeaderSize): .long ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle)
.text

View File

@ -38,7 +38,7 @@ ENDM
.data
ExceptionStubHeaderSize DW Exception1Handle - Exception0Handle
ExceptionStubHeaderSize DD Exception1Handle - Exception0Handle
CommonEntryAddr DD CommonEntry
.code

View File

@ -34,7 +34,7 @@ ASM_GLOBAL ASM_PFX(CommonEntry)
.data
ASM_PFX(ExceptionStubHeaderSize): .word ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle)
ASM_PFX(ExceptionStubHeaderSize): .long ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle)
.text
@ -271,13 +271,13 @@ NoExtrPush:
movzwq 32(%rbp), %rax
# movq %cs, %rax
pushq %rax
movq %ds, %rax
movw %ds, %rax
pushq %rax
movq %es, %rax
movw %es, %rax
pushq %rax
movq %fs, %rax
movw %fs, %rax
pushq %rax
movq %gs, %rax
movw %gs, %rax
pushq %rax
## UINT64 Rip;

View File

@ -32,7 +32,7 @@ AGENT_HANDLER_SIGNATURE MACRO
db 41h, 47h, 54h, 48h ; SIGNATURE_32('A','G','T','H')
ENDM
ExceptionStubHeaderSize dw Exception1Handle - Exception0Handle ;
ExceptionStubHeaderSize dd Exception1Handle - Exception0Handle ;
CommonEntryAddr dq CommonEntry ;
.code