]>
Commit | Line | Data |
---|---|---|
1f25dacf LG |
1 | // @file\r |
2 | // Contains the macros required by calling procedures in Itanium-based assembly code.\r | |
3 | //\r | |
9df063a0 HT |
4 | // Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r |
5 | // This program and the accompanying materials\r | |
42a885c2 | 6 | // are licensed and made available under the terms and conditions of the BSD License\r |
7 | // which accompanies this distribution. The full text of the license may be found at\r | |
8 | // http://opensource.org/licenses/bsd-license.php\r | |
9 | //\r | |
10 | // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | //\r | |
959ccb23 | 13 | \r |
14 | #ifndef __IA64PROC_I__\r | |
15 | #define __IA64PROC_I__\r | |
16 | \r | |
1f25dacf LG |
17 | //\r |
18 | // Delcare the begin of assembly function entry.\r | |
19 | //\r | |
20 | // @param name Name of function in assembly code.\r | |
21 | //\r | |
959ccb23 | 22 | #define PROCEDURE_ENTRY(name) .##text; \\r |
23 | .##type name, @function; \\r | |
24 | .##proc name; \\r | |
25 | name::\r | |
26 | \r | |
1f25dacf LG |
27 | //\r |
28 | // End of assembly function.\r | |
29 | //\r | |
30 | // @param name Name of function in assembly code.\r | |
31 | //\r | |
959ccb23 | 32 | #define PROCEDURE_EXIT(name) .##endp name\r |
33 | \r | |
1f25dacf LG |
34 | //\r |
35 | // NESTED_SETUP Requires number of locals (l) >= 3\r | |
36 | //\r | |
959ccb23 | 37 | #define NESTED_SETUP(i,l,o,r) \\r |
38 | alloc loc1=ar##.##pfs,i,l,o,r ;\\r | |
39 | mov loc0=b0\r | |
40 | \r | |
1f25dacf LG |
41 | //\r |
42 | // End of Nested\r | |
43 | //\r | |
959ccb23 | 44 | #define NESTED_RETURN \\r |
45 | mov b0=loc0 ;\\r | |
46 | mov ar##.##pfs=loc1 ;;\\r | |
47 | br##.##ret##.##dpnt b0;;\r | |
48 | \r | |
1f25dacf LG |
49 | //\r |
50 | // Export assembly function as the global function.\r | |
51 | //\r | |
52 | // @param Function Name of function in assembly code.\r | |
53 | //\r | |
959ccb23 | 54 | #define GLOBAL_FUNCTION(Function) \\r |
55 | .##type Function, @function; \\r | |
42a885c2 | 56 | .##globl Function\r |
57 | \r | |
959ccb23 | 58 | #endif\r |