]> git.proxmox.com Git - mirror_edk2.git/blobdiff - InOsEmuPkg/Unix/Sec/X64/Gasket.S
Clarify the requirements for the Destination parameter of UnicodeStrToAsciiStr.
[mirror_edk2.git] / InOsEmuPkg / Unix / Sec / X64 / Gasket.S
index 6b5e78241398d5f04d10617129cef8d5015258d6..7ea49bb4220f815fff1eca3fb99e5ab2ac07433e 100644 (file)
@@ -132,6 +132,9 @@ ASM_PFX(GasketSecMalloc):
   movq    %rsp, %rbp
 
   pushq    %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq    %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
 
   call  ASM_PFX(SecMalloc)
   
@@ -140,12 +143,32 @@ ASM_PFX(GasketSecMalloc):
   popq  %rbp
   ret
 
+ASM_GLOBAL ASM_PFX(GasketSecValloc)
+ASM_PFX(GasketSecValloc):
+  pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq    %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq    %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
+
+  call  ASM_PFX(SecValloc)
+  
+  popq  %rdi            // restore state
+  popq  %rsi
+  popq  %rbp
+  ret
+
 ASM_GLOBAL ASM_PFX(GasketSecFree)
 ASM_PFX(GasketSecFree):
   pushq   %rbp            // stack frame is for the debugger
   movq    %rsp, %rbp
 
   pushq    %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq    %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
 
   call  ASM_PFX(SecFree)