]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SourceLevelDebugPkg: DebugAgentLib: Fix clang/Xcode 5 compile/link errors
authorAnderw Fish <afish@apple.com>
Tue, 9 Sep 2014 06:27:45 +0000 (06:27 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 9 Sep 2014 06:27:45 +0000 (06:27 +0000)
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

SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h
SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.S
SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.asm
SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFuncs.S
SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFuncs.asm

index 6f1d3e5aab153f352a28214b4bc9da71c8d40f9d..53d96609be542496c3e89288c364bd366f3d631c 100644 (file)
@@ -67,7 +67,7 @@
 \r
 extern UINTN  Exception0Handle;\r
 extern UINTN  TimerInterruptHandle;\r
-extern UINT16 ExceptionStubHeaderSize;\r
+extern UINT32 ExceptionStubHeaderSize;\r
 extern BOOLEAN mSkipBreakpoint;\r
 extern EFI_VECTOR_HANDOFF_INFO mVectorHandoffInfoDebugAgent[];\r
 extern UINTN                   mVectorHandoffInfoCount;\r
index 284939126f7d02009096fdeb9be7704a44b495fd..efeaebc2c84a3b9d85ebc4e1a7c1ce9dd02bfa8d 100644 (file)
@@ -33,7 +33,7 @@ ASM_GLOBAL ASM_PFX(CommonEntry)
 \r
 .data\r
 \r
-ASM_PFX(ExceptionStubHeaderSize):  .word     ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle)\r
+ASM_PFX(ExceptionStubHeaderSize):  .long     ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle)\r
 \r
 .text\r
 \r
index 9b219fc07d57789dad9cb7c99ee1dba23b19c609..2aaf5b7b4cc5c886e84adf12395314bc9a528c70 100644 (file)
@@ -38,7 +38,7 @@ ENDM
 \r
 .data\r
 \r
-ExceptionStubHeaderSize   DW    Exception1Handle - Exception0Handle\r
+ExceptionStubHeaderSize   DD    Exception1Handle - Exception0Handle\r
 CommonEntryAddr           DD    CommonEntry\r
 \r
 .code\r
index 365bc940fe660b953db233cba89ddd57ab585d0b..276f036a83ebe91158c36e6aa9856cfa26dfdf45 100644 (file)
@@ -34,7 +34,7 @@ ASM_GLOBAL ASM_PFX(CommonEntry)
 \r
 .data\r
 \r
-ASM_PFX(ExceptionStubHeaderSize):  .word     ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle)\r
+ASM_PFX(ExceptionStubHeaderSize):  .long     ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle)\r
 \r
 \r
 .text\r
@@ -271,13 +271,13 @@ NoExtrPush:
   movzwq   32(%rbp), %rax\r
 #  movq     %cs, %rax\r
   pushq    %rax\r
-  movq     %ds, %rax\r
+  movw     %ds, %rax\r
   pushq    %rax\r
-  movq     %es, %rax\r
+  movw     %es, %rax\r
   pushq    %rax\r
-  movq     %fs, %rax\r
+  movw     %fs, %rax\r
   pushq    %rax\r
-  movq     %gs, %rax\r
+  movw     %gs, %rax\r
   pushq    %rax\r
 \r
 ## UINT64  Rip;\r
index cf8c5f0194718305c53817c197fa75bd73e47deb..0f076a76dae41280158b6c7d62bffc7d29695b74 100644 (file)
@@ -32,7 +32,7 @@ AGENT_HANDLER_SIGNATURE  MACRO
   db   41h, 47h, 54h, 48h       ; SIGNATURE_32('A','G','T','H')\r
 ENDM\r
 \r
-ExceptionStubHeaderSize        dw      Exception1Handle - Exception0Handle ;\r
+ExceptionStubHeaderSize        dd      Exception1Handle - Exception0Handle ;\r
 CommonEntryAddr                dq      CommonEntry ;\r
 \r
 .code\r