Index: Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.S
===================================================================
--- Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.S	(revision 15574)
+++ Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.S	(working copy)
@@ -274,7 +274,7 @@
     pushq   %rcx
     movq    8(%rax), %rcx
     pushq   %rax
-    movabsl ASM_PFX(mErrorCodeFlag), %eax
+    movl    ASM_PFX(mErrorCodeFlag)(%rip), %eax
     bt      %ecx, %eax
     popq    %rax
     jnc     NoErrorData
@@ -304,7 +304,7 @@
     cmp     $32, %ecx          # Intel reserved vector for exceptions?
     jae     NoErrorCode
     pushq   %rax
-    movabsl ASM_PFX(mErrorCodeFlag), %eax
+    movl    ASM_PFX(mErrorCodeFlag)(%rip), %eax
     bt      %ecx, %eax
     popq    %rax
     jc      CommonInterruptEntry_al_0000
@@ -553,7 +553,7 @@
 
 DoReturn:
     pushq   %rax
-    movabsq ASM_PFX(mDoFarReturnFlag), %rax
+    movq    ASM_PFX(mDoFarReturnFlag)(%rip), %rax
     cmpq    $0, %rax          # Check if need to do far return instead of IRET
     popq    %rax
     jz      DoIret
@@ -566,7 +566,7 @@
     movq    (%rax), %rax      # restore rax
     popfq                     # restore EFLAGS
     .byte   0x48              # prefix to composite "retq" with next "retf"
-    retf                      # far return
+    lret                      # far return
 DoIret:
     iretq
 
