2 // Contains the macros required by calling procedures in Itanium-based assembly code.
4 // Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
5 // This program and the accompanying materials
6 // are licensed and made available under the terms and conditions of the BSD License
7 // which accompanies this distribution. The full text of the license may be found at
8 // http://opensource.org/licenses/bsd-license.php
10 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 #ifndef __IA64PROC_I__
15 #define __IA64PROC_I__
18 // Delcare the begin of assembly function entry.
20 // @param name Name of function in assembly code.
22 #define PROCEDURE_ENTRY(name) .##text; \
23 .##type name, @function; \
28 // End of assembly function.
30 // @param name Name of function in assembly code.
32 #define PROCEDURE_EXIT(name) .##endp name
35 // NESTED_SETUP Requires number of locals (l) >= 3
37 #define NESTED_SETUP(i,l,o,r) \
38 alloc loc1=ar##.##pfs,i,l,o,r ;\
44 #define NESTED_RETURN \
46 mov ar##.##pfs=loc1 ;;\
47 br##.##ret##.##dpnt b0;;
50 // Export assembly function as the global function.
52 // @param Function Name of function in assembly code.
54 #define GLOBAL_FUNCTION(Function) \
55 .##type Function, @function; \