summaryrefslogtreecommitdiff
path: root/UnixPkg/Sec/Ia32
diff options
context:
space:
mode:
Diffstat (limited to 'UnixPkg/Sec/Ia32')
-rw-r--r--UnixPkg/Sec/Ia32/Gasket.S20
-rw-r--r--UnixPkg/Sec/Ia32/GasketTemplate.c9
2 files changed, 27 insertions, 2 deletions
diff --git a/UnixPkg/Sec/Ia32/Gasket.S b/UnixPkg/Sec/Ia32/Gasket.S
index f9a2b53faf..caeabf89eb 100644
--- a/UnixPkg/Sec/Ia32/Gasket.S
+++ b/UnixPkg/Sec/Ia32/Gasket.S
@@ -16,7 +16,7 @@
# on Leopard and _stat$INDOE64 on Snow Leopard. That is why we pass stat()
# into one of these gaskets from C code.
#
-# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
+# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -235,7 +235,23 @@ _GasketUintnUint16:
call *%eax
leave
ret
-
+.globl _ReverseGasketUint64
+_ReverseGasketUint64:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $56, %esp
+ movl 12(%ebp), %eax
+ movl %eax, -32(%ebp)
+ movl 16(%ebp), %eax
+ movl %eax, -28(%ebp)
+ movl 8(%ebp), %eax
+ movl %eax, -12(%ebp)
+ movl -32(%ebp), %eax
+ movl %eax, (%esp)
+ movl -12(%ebp), %eax
+ call *%eax
+ leave
+ ret
.subsections_via_symbols
#endif
diff --git a/UnixPkg/Sec/Ia32/GasketTemplate.c b/UnixPkg/Sec/Ia32/GasketTemplate.c
index c9824de6ba..8ff801d72e 100644
--- a/UnixPkg/Sec/Ia32/GasketTemplate.c
+++ b/UnixPkg/Sec/Ia32/GasketTemplate.c
@@ -138,5 +138,14 @@ GasketUintnUint16 (void *api, UINTN a, UINT16 b)
return func (a, b);
}
+void
+ReverseGasketUint64 (void *api, UINT64 a)
+{
+ GASKET_UINTN func;
+
+ func = (GASKET_UINTN)api;
+ func (a);
+ return;
+}