2 Template file used to create Gasket.S
4 This file is built on the command line via gcc GasketTemplate.c -S
5 and it will create GasketTemplate.s and this was used to create
6 Gasket.S. You still have to add the extra stack alignment code to
7 the assembly functions.
9 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
10 Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
11 This program and the accompanying materials
12 are licensed and made available under the terms and conditions of the BSD License
13 which accompanies this distribution. The full text of the license may be found at
14 http://opensource.org/licenses/bsd-license.php
16 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
17 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
26 typedef uint8_t UINT8
;
27 typedef int16_t INT16
;
28 typedef uint16_t UINT16
;
29 typedef int32_t INT32
;
30 typedef uint32_t UINT32
;
31 typedef int64_t INT64
;
32 typedef uint64_t UINT64
;
36 typedef int (*GASKET_VOID
) ();
37 typedef int (*GASKET_UINTN
) (UINTN
);
38 typedef int (*GASKET_UINT64
) (UINT64
);
39 typedef int (*GASKET_UINT64UINT64
) (UINT64
, UINT64
);
40 typedef int (*GASKET_UINTN_UINTN
) (UINTN
, UINTN
);
41 typedef int (*GASKET_UINTN_UINTN_UINTN
) (UINTN
, UINTN
, UINTN
);
42 typedef int (*GASKET_UINTN_UINTN_UINTN_UINTN
) (UINTN
, UINTN
, UINTN
, UINTN
);
43 typedef int (*GASKET_UINTN_10ARGS
) (UINTN
, UINTN
, UINTN
, UINTN
, UINTN
, UINTN
, UINTN
, UINTN
, UINTN
, UINTN
);
44 typedef int (*GASKET_UINT64_UINTN
) (UINT64
, UINTN
);
45 typedef UINT64 (*GASKET_UINTN_UINT64_UINTN
) (UINTN
, UINT64
, UINTN
);
46 typedef int (*GASKET_UINTN_UINT16
) (UINTN
, UINT16
);
48 int GasketVoid (void *api
);
49 int GasketUintn (void *api
, UINTN a
);
50 int GasketUintnUintn (void *api
, UINTN a
, UINTN b
);
51 int GasketUintnUintnUintn (void *api
, UINTN a
, UINTN b
, UINTN c
);
52 int GasketUintnUintnUintnUintn (void *api
, UINTN a
, UINTN b
, UINTN c
, UINTN d
);
53 int GasketUintn10Args (void *api
, UINTN a
, UINTN b
, UINTN c
, UINTN d
, UINTN e
, UINTN f
, UINTN g
, UINTN h
, UINTN i
, UINTN j
);
54 int GasketUint64Uintn (void *api
, UINT64 a
, UINTN b
);
55 UINT64
GasketUintnUiny64Uintn (void *api
, UINTN a
, UINT64 b
, UINTN c
);
56 int GasketUintnUint16 (void *api
, UINTN a
, UINT16 b
);
61 GasketVoid (void *api
)
65 func
= (GASKET_VOID
)api
;
70 GasketUintn (void *api
, UINTN a
)
74 func
= (GASKET_UINTN
)api
;
79 GasketUintnUintn (void *api
, UINTN a
, UINTN b
)
81 GASKET_UINTN_UINTN func
;
83 func
= (GASKET_UINTN_UINTN
)api
;
89 GasketUintnUintnUintn (void *api
, UINTN a
, UINTN b
, UINTN c
)
91 GASKET_UINTN_UINTN_UINTN func
;
93 func
= (GASKET_UINTN_UINTN_UINTN
)api
;
94 return func (a
, b
, c
);
98 GasketUintnUintnUintnUintn (void *api
, UINTN a
, UINTN b
, UINTN c
, UINTN d
)
100 GASKET_UINTN_UINTN_UINTN_UINTN func
;
102 func
= (GASKET_UINTN_UINTN_UINTN_UINTN
)api
;
103 return func (a
, b
, c
, d
);
107 GasketUintn10Args (void *api
, UINTN a
, UINTN b
, UINTN c
, UINTN d
, UINTN e
, UINTN f
, UINTN g
, UINTN h
, UINTN i
, UINTN j
)
109 GASKET_UINTN_10ARGS func
;
111 func
= (GASKET_UINTN_10ARGS
)api
;
112 return func (a
, b
, c
, d
, e
, f
, g
, h
, i
, j
);
117 GasketUint64Uintn (void *api
, UINT64 a
, UINTN b
)
119 GASKET_UINT64_UINTN func
;
121 func
= (GASKET_UINT64_UINTN
)api
;
126 GasketUintnUint64Uintn (void *api
, UINTN a
, UINT64 b
, UINTN c
)
128 GASKET_UINTN_UINT64_UINTN func
;
130 func
= (GASKET_UINTN_UINT64_UINTN
)api
;
131 return func (a
, b
, c
);
135 GasketUintnUint16 (void *api
, UINTN a
, UINT16 b
)
137 GASKET_UINTN_UINT16 func
;
139 func
= (GASKET_UINTN_UINT16
)api
;
144 ReverseGasketUint64 (void *api
, UINT64 a
)
148 func
= (GASKET_UINT64
)api
;
154 ReverseGasketUint64UINT64 (void *api
, UINT64 a
, UINT64 b
)
156 GASKET_UINT64UINT64 func
;
158 func
= (GASKET_UINT64UINT64
)api
;