]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmulatorPkg/Unix/Host/X64/Gasket.S
EmulatorPkg: Remove all trailing whitespace
[mirror_edk2.git] / EmulatorPkg / Unix / Host / X64 / Gasket.S
index 7ea49bb4220f815fff1eca3fb99e5ab2ac07433e..c339461cd8c13a01eedf7ab4ee4a7903e11bac45 100644 (file)
 
 // 32 byte shadow to spill rcx-r9, 8 bytes to align stack on 16 byte boundry
 // Any call with 0 - 4 arguments allocates 40 bytes on the stack.
-// For more than 4 args you always have to increase in quanta of 16 so 5 or 6 args is 56, 
+// For more than 4 args you always have to increase in quanta of 16 so 5 or 6 args is 56,
 // 7 or 8 args is 72, and 9 or 10 args is 88
 
 
 
   .text
-  
+
 //
 // EMU_THUNK_PROTOCOL gaskets (EFIAPI to UNIX ABI)
 //
@@ -49,11 +49,11 @@ ASM_PFX(GasketSecWriteStdErr):
   pushq    %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq    %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call  ASM_PFX(SecWriteStdErr)
-  
+
   popq  %rdi            // restore state
   popq  %rsi
   popq  %rbp
@@ -69,7 +69,7 @@ ASM_PFX(GasketSecConfigStdIn):
   pushq    %rdi
 
   call  ASM_PFX(SecConfigStdIn)
-  
+
   popq  %rdi            // restore state
   popq  %rsi
   popq  %rbp
@@ -83,11 +83,11 @@ ASM_PFX(GasketSecWriteStdOut):
   pushq    %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq    %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call  ASM_PFX(SecWriteStdOut)
-  
+
   popq  %rdi            // restore state
   popq  %rsi
   popq  %rbp
@@ -101,11 +101,11 @@ ASM_PFX(GasketSecReadStdIn):
   pushq    %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq    %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call  ASM_PFX(SecReadStdIn)
-  
+
   popq  %rdi            // restore state
   popq  %rsi
   popq  %rbp
@@ -120,7 +120,7 @@ ASM_PFX(GasketSecPollStdIn):
   pushq    %rdi
 
   call  ASM_PFX(SecPollStdIn)
-  
+
   popq  %rdi            // restore state
   popq  %rsi
   popq  %rbp
@@ -134,10 +134,10 @@ ASM_PFX(GasketSecMalloc):
   pushq    %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq    %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call  ASM_PFX(SecMalloc)
-  
+
   popq  %rdi            // restore state
   popq  %rsi
   popq  %rbp
@@ -151,10 +151,10 @@ ASM_PFX(GasketSecValloc):
   pushq    %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq    %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call  ASM_PFX(SecValloc)
-  
+
   popq  %rdi            // restore state
   popq  %rsi
   popq  %rbp
@@ -168,10 +168,10 @@ ASM_PFX(GasketSecFree):
   pushq    %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq    %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call  ASM_PFX(SecFree)
-  
+
   popq  %rdi            // restore state
   popq  %rsi
   popq  %rbp
@@ -186,11 +186,11 @@ ASM_PFX(GasketSecSetTimer):
   pushq    %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq    %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call  ASM_PFX(SecSetTimer)
-  
+
   popq  %rdi            // restore state
   popq  %rsi
   popq  %rbp
@@ -206,7 +206,7 @@ ASM_PFX(GasketSecEnableInterrupt):
   pushq   %rdi
 
   call    ASM_PFX(SecEnableInterrupt)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -222,7 +222,7 @@ ASM_PFX(GasketSecDisableInterrupt):
   pushq   %rdi
 
   call    ASM_PFX(SecDisableInterrupt)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -237,7 +237,7 @@ ASM_PFX(GasketQueryPerformanceFrequency):
   pushq   %rdi
 
   call    ASM_PFX(QueryPerformanceFrequency)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -253,7 +253,7 @@ ASM_PFX(GasketQueryPerformanceCounter):
   pushq   %rdi
 
   call    ASM_PFX(QueryPerformanceCounter)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -268,16 +268,16 @@ ASM_PFX(GasketSecSleep):
   pushq    %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq    %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call  ASM_PFX(SecSleep)
-  
+
   popq  %rdi            // restore state
   popq  %rsi
   popq  %rbp
   ret
-  
-  
+
+
 ASM_GLOBAL ASM_PFX(GasketSecCpuSleep)
 ASM_PFX(GasketSecCpuSleep):
   pushq   %rbp            // stack frame is for the debugger
@@ -287,24 +287,24 @@ ASM_PFX(GasketSecCpuSleep):
   pushq    %rdi
 
   call  ASM_PFX(SecCpuSleep)
-  
+
   popq  %rdi            // restore state
   popq  %rsi
   popq  %rbp
   ret
-  
-  
+
+
 ASM_GLOBAL ASM_PFX(GasketSecExit)
 ASM_PFX(GasketSecExit):
   pushq   %rbp                 // stack frame is for the debugger
   movq    %rsp, %rbp
 
-  movq    %rcx, %rdi           // Swizzle args 
+  movq    %rcx, %rdi           // Swizzle args
   call    ASM_PFX(SecExit)     // Less to do as we will never return to EFI ABI world
 LDEAD_LOOP:
   jmp  LDEAD_LOOP              // _exit should never return
 
-  
+
 ASM_GLOBAL ASM_PFX(GasketSecGetTime)
 ASM_PFX(GasketSecGetTime):
   pushq   %rbp            // stack frame is for the debugger
@@ -313,8 +313,8 @@ ASM_PFX(GasketSecGetTime):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call  ASM_PFX(SecGetTime)
 
@@ -331,8 +331,8 @@ ASM_PFX(GasketSecSetTime):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call  ASM_PFX(SecSetTime)
 
@@ -350,13 +350,13 @@ ASM_PFX(GasketSecGetNextProtocol):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
 
   call    ASM_PFX(SecGetNextProtocol)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -372,16 +372,16 @@ ASM_PFX(GasketSecPeCoffGetEntryPoint):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call    ASM_PFX(SecPeCoffGetEntryPoint)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
   ret
+
 ASM_GLOBAL ASM_PFX(GasketSecPeCoffRelocateImageExtraAction)
 ASM_PFX(GasketSecPeCoffRelocateImageExtraAction):
   pushq   %rbp            // stack frame is for the debugger
@@ -390,15 +390,15 @@ ASM_PFX(GasketSecPeCoffRelocateImageExtraAction):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(SecPeCoffRelocateImageExtraAction)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
   ret
+
 ASM_GLOBAL ASM_PFX(GasketSecPeCoffUnloadImageExtraAction)
 ASM_PFX(GasketSecPeCoffUnloadImageExtraAction):
   pushq   %rbp            // stack frame is for the debugger
@@ -407,15 +407,15 @@ ASM_PFX(GasketSecPeCoffUnloadImageExtraAction):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(SecPeCoffUnloadImageExtraAction)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
   ret
+
 
 ASM_GLOBAL ASM_PFX(GasketSecEmuThunkAddress)
 ASM_PFX(GasketSecEmuThunkAddress):
@@ -426,7 +426,7 @@ ASM_PFX(GasketSecEmuThunkAddress):
   pushq   %rdi
 
   call    ASM_PFX(SecEmuThunkAddress)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -444,13 +444,13 @@ ASM_PFX(GasketX11Size):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
 
   call    ASM_PFX(X11Size)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -465,10 +465,10 @@ ASM_PFX(GasketX11CheckKey):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(X11CheckKey)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -482,11 +482,11 @@ ASM_PFX(GasketX11GetKey):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call    ASM_PFX(X11GetKey)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -501,17 +501,17 @@ ASM_PFX(GasketX11KeySetState):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call    ASM_PFX(X11KeySetState)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
   ret
 
-  
+
 ASM_GLOBAL ASM_PFX(GasketX11RegisterKeyNotify)
 ASM_PFX(GasketX11RegisterKeyNotify):
   pushq   %rbp            // stack frame is for the debugger
@@ -520,19 +520,19 @@ ASM_PFX(GasketX11RegisterKeyNotify):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
 
   call    ASM_PFX(X11RegisterKeyNotify)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
   ret
 
-  
+
 ASM_GLOBAL ASM_PFX(GasketX11Blt)
 ASM_PFX(GasketX11Blt):
   pushq   %rbp            // stack frame is for the debugger
@@ -541,13 +541,13 @@ ASM_PFX(GasketX11Blt):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
 
   call    ASM_PFX(X11Blt)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -562,10 +562,10 @@ ASM_PFX(GasketX11CheckPointer):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(X11CheckPointer)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -580,11 +580,11 @@ ASM_PFX(GasketX11GetPointerState):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call    ASM_PFX(X11GetPointerState)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -599,16 +599,16 @@ ASM_PFX(GasketX11GraphicsWindowOpen):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(X11GraphicsWindowOpen)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
   ret
 
+
 ASM_GLOBAL ASM_PFX(GasketX11GraphicsWindowClose)
 ASM_PFX(GasketX11GraphicsWindowClose):
   pushq   %rbp            // stack frame is for the debugger
@@ -617,11 +617,11 @@ ASM_PFX(GasketX11GraphicsWindowClose):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
   movq    %r9,  %rcx
 
   call    ASM_PFX(X11GraphicsWindowClose)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -638,10 +638,10 @@ ASM_PFX(GasketPthreadMutexLock):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(PthreadMutexLock)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -656,10 +656,10 @@ ASM_PFX(GasketPthreadMutexUnLock):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(PthreadMutexUnLock)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -673,10 +673,10 @@ ASM_PFX(GasketPthreadMutexTryLock):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(PthreadMutexTryLock)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -692,14 +692,14 @@ ASM_PFX(GasketPthreadMutexInit):
 
 
   call    ASM_PFX(PthreadMutexInit)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
   ret
 
 
+
 ASM_GLOBAL ASM_PFX(GasketPthreadMutexDestroy)
 ASM_PFX(GasketPthreadMutexDestroy):
   pushq   %rbp            // stack frame is for the debugger
@@ -708,10 +708,10 @@ ASM_PFX(GasketPthreadMutexDestroy):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(PthreadMutexDestroy)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -726,19 +726,19 @@ ASM_PFX(GasketPthreadCreate):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
 
   call    ASM_PFX(PthreadCreate)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
   ret
 
-                          
+
 ASM_GLOBAL ASM_PFX(GasketPthreadExit)
 ASM_PFX(GasketPthreadExit):
   pushq   %rbp            // stack frame is for the debugger
@@ -747,17 +747,17 @@ ASM_PFX(GasketPthreadExit):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(PthreadExit)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
   ret
 
 
-                            
+
 ASM_GLOBAL ASM_PFX(GasketPthreadSelf)
 ASM_PFX(GasketPthreadSelf):
   pushq   %rbp            // stack frame is for the debugger
@@ -768,7 +768,7 @@ ASM_PFX(GasketPthreadSelf):
 
 
   call    ASM_PFX(PthreadSelf)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -783,10 +783,10 @@ ASM_PFX(GasketPthreadOpen):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(PthreadOpen)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -801,10 +801,10 @@ ASM_PFX(GasketPthreadClose):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(PthreadClose)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -826,14 +826,14 @@ ASM_PFX(ReverseGasketUint64):
   pushq   %rbp            // stack frame is for the debugger
   movq    %rsp, %rbp
 
-  movq    %rdi, %rax    // Swizzle args 
-  movq    %rsi, %rcx     
+  movq    %rdi, %rax    // Swizzle args
+  movq    %rsi, %rcx
 
   subq  $32, %rsp        // 32-byte shadow space
   call  *%rax
   addq  $32, %rsp
 
-  popq   %rbp          
+  popq   %rbp
   ret
 
 //
@@ -850,16 +850,16 @@ ASM_PFX(ReverseGasketUint64Uint64):
   pushq   %rbp            // stack frame is for the debugger
   movq    %rsp, %rbp
 
-  movq    %rdi, %rax    // Swizzle args 
-  movq    %rsi, %rcx     
+  movq    %rdi, %rax    // Swizzle args
+  movq    %rsi, %rcx
 
   subq  $32, %rsp        // 32-byte shadow space
   call  *%rax
   addq  $32, %rsp
 
-  popq   %rbp          
+  popq   %rbp
   ret
-  
+
 
 ASM_GLOBAL ASM_PFX(GasketSecUnixPeiAutoScan)
 ASM_PFX(GasketSecUnixPeiAutoScan):
@@ -869,12 +869,12 @@ ASM_PFX(GasketSecUnixPeiAutoScan):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
 
   call    ASM_PFX(SecUnixPeiAutoScan)
-  
+
   popq    %rdi          // restore state
   popq    %rsi
   popq    %rbp
@@ -889,8 +889,8 @@ ASM_PFX(GasketSecUnixFdAddress):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
 
@@ -912,8 +912,8 @@ ASM_PFX(GasketPosixOpenVolume):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
 
@@ -933,12 +933,12 @@ ASM_PFX(GasketPosixFileOpen):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
-  movq    48(%rbp), %r8 
+  movq    48(%rbp), %r8
+
   call    ASM_PFX(PosixFileOpen)
 
   popq    %rdi          // restore state
@@ -955,7 +955,7 @@ ASM_PFX(GasketPosixFileCLose):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(PosixFileCLose)
 
@@ -964,7 +964,7 @@ ASM_PFX(GasketPosixFileCLose):
   popq    %rbp
   ret
 
-  
+
 ASM_GLOBAL ASM_PFX(GasketPosixFileDelete)
 ASM_PFX(GasketPosixFileDelete):
   pushq   %rbp            // stack frame is for the debugger
@@ -973,7 +973,7 @@ ASM_PFX(GasketPosixFileDelete):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(PosixFileDelete)
 
@@ -991,8 +991,8 @@ ASM_PFX(GasketPosixFileRead):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
 
   call    ASM_PFX(PosixFileRead)
@@ -1002,7 +1002,7 @@ ASM_PFX(GasketPosixFileRead):
   popq    %rbp
   ret
 
-  
+
 ASM_GLOBAL ASM_PFX(GasketPosixFileWrite)
 ASM_PFX(GasketPosixFileWrite):
   pushq   %rbp            // stack frame is for the debugger
@@ -1011,8 +1011,8 @@ ASM_PFX(GasketPosixFileWrite):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
 
   call    ASM_PFX(PosixFileWrite)
@@ -1031,8 +1031,8 @@ ASM_PFX(GasketPosixFileSetPossition):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call    ASM_PFX(PosixFileSetPossition)
 
@@ -1050,8 +1050,8 @@ ASM_PFX(GasketPosixFileGetPossition):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call    ASM_PFX(PosixFileGetPossition)
 
@@ -1069,8 +1069,8 @@ ASM_PFX(GasketPosixFileGetInfo):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
 
@@ -1090,8 +1090,8 @@ ASM_PFX(GasketPosixFileSetInfo):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
 
@@ -1111,7 +1111,7 @@ ASM_PFX(GasketPosixFileFlush):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(PosixFileFlush)
 
@@ -1129,7 +1129,7 @@ ASM_PFX(GasketPosixFileSystmeThunkOpen):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(PosixFileSystmeThunkOpen)
 
@@ -1147,7 +1147,7 @@ ASM_PFX(GasketPosixFileSystmeThunkClose):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(PosixFileSystmeThunkClose)
 
@@ -1164,8 +1164,8 @@ ASM_PFX(GasketEmuBlockIoReset):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call    ASM_PFX(EmuBlockIoReset)
 
@@ -1183,12 +1183,12 @@ ASM_PFX(GasketEmuBlockIoReadBlocks):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
-  movq    48(%rbp), %r8   
-  movq    56(%rbp), %r9   
+  movq    48(%rbp), %r8
+  movq    56(%rbp), %r9
 
   call    ASM_PFX(EmuBlockIoReadBlocks)
 
@@ -1206,12 +1206,12 @@ ASM_PFX(GasketEmuBlockIoWriteBlocks):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
-  movq    48(%rbp), %r8   
-  movq    56(%rbp), %r9   
+  movq    48(%rbp), %r8
+  movq    56(%rbp), %r9
 
   call    ASM_PFX(EmuBlockIoWriteBlocks)
 
@@ -1229,8 +1229,8 @@ ASM_PFX(GasketEmuBlockIoFlushBlocks):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi    
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call    ASM_PFX(EmuBlockIoFlushBlocks)
 
@@ -1248,8 +1248,8 @@ ASM_PFX(GasketEmuBlockIoCreateMapping):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call    ASM_PFX(EmuBlockIoCreateMapping)
 
@@ -1267,7 +1267,7 @@ ASM_PFX(GasketBlockIoThunkOpen):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(EmuBlockIoThunkOpen)
 
@@ -1285,7 +1285,7 @@ ASM_PFX(GasketBlockIoThunkClose):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(EmuBlockIoThunkClose)
 
@@ -1304,8 +1304,8 @@ ASM_PFX(GasketSnpCreateMapping):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call    ASM_PFX(EmuSnpCreateMapping)
 
@@ -1323,7 +1323,7 @@ ASM_PFX(GasketSnpStart):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(EmuSnpStart)
 
@@ -1341,7 +1341,7 @@ ASM_PFX(GasketSnpStop):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(EmuSnpStop)
 
@@ -1359,8 +1359,8 @@ ASM_PFX(GasketSnpInitialize):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
 
   call    ASM_PFX(EmuSnpInitialize)
@@ -1380,8 +1380,8 @@ ASM_PFX(GasketSnpReset):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
 
   call    ASM_PFX(EmuSnpReset)
 
@@ -1399,7 +1399,7 @@ ASM_PFX(GasketSnpShutdown):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(EmuSnpShutdown)
 
@@ -1417,12 +1417,12 @@ ASM_PFX(GasketSnpReceiveFilters):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
-  movq    48(%rbp), %r8   
-  movq    56(%rbp), %r9   
+  movq    48(%rbp), %r8
+  movq    56(%rbp), %r9
 
   call    ASM_PFX(EmuSnpReceiveFilters)
 
@@ -1440,8 +1440,8 @@ ASM_PFX(GasketSnpStationAddress):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
 
   call    ASM_PFX(EmuSnpStationAddress)
@@ -1461,8 +1461,8 @@ ASM_PFX(GasketSnpStatistics):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
 
@@ -1482,8 +1482,8 @@ ASM_PFX(GasketSnpMCastIpToMac):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
 
@@ -1503,11 +1503,11 @@ ASM_PFX(GasketSnpNvData):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
-  movq    48(%rbp), %r8   
+  movq    48(%rbp), %r8
 
   call    ASM_PFX(EmuSnpNvData)
 
@@ -1525,8 +1525,8 @@ ASM_PFX(GasketSnpGetStatus):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
 
   call    ASM_PFX(EmuSnpGetStatus)
@@ -1542,17 +1542,17 @@ ASM_GLOBAL ASM_PFX(GasketSnpTransmit)
 ASM_PFX(GasketSnpTransmit):
   pushq   %rbp            // stack frame is for the debugger
   movq    %rsp, %rbp
-       subq    $16, %rsp       // Allocate space for args on the stack 
+       subq    $16, %rsp       // Allocate space for args on the stack
 
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
-  movq    48(%rbp), %r8   
-  movq    56(%rbp), %r9   
+  movq    48(%rbp), %r8
+  movq    56(%rbp), %r9
   movq    64(%rbp), %rax
   movq    %rax,     (%rsp)
 
@@ -1575,12 +1575,12 @@ ASM_PFX(GasketSnpReceive):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
-  movq    %rdx, %rsi     
+  movq    %rcx, %rdi    // Swizzle args
+  movq    %rdx, %rsi
   movq    %r8,  %rdx
   movq    %r9,  %rcx
-  movq    48(%rbp), %r8   
-  movq    56(%rbp), %r9   
+  movq    48(%rbp), %r8
+  movq    56(%rbp), %r9
   movq    64(%rbp), %rax
   movq    %rax,     (%rsp)
 
@@ -1601,7 +1601,7 @@ ASM_PFX(GasketSnpThunkOpen):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(EmuSnpThunkOpen)
 
@@ -1619,7 +1619,7 @@ ASM_PFX(GasketSnpThunkClose):
   pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
   pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rcx, %rdi    // Swizzle args
 
   call    ASM_PFX(EmuSnpThunkClose)