Index: UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.S
===================================================================
--- UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.S	(revision 16094)
+++ UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.S	(working copy)
@@ -378,12 +378,7 @@
     pushq   0x18(%rax)        # save EFLAGS in new location
     movq    (%rax), %rax      # restore rax
     popfq                     # restore EFLAGS
-    .byte   0x48              # prefix to composite "retq" with next "retf"
-#ifdef __APPLE__
-    .byte   0xCB
-#else
-    retf                      # far return
-#endif
+    lretq                     # far return
 DoIret:
     iretq
 
