1 // @file 2 // Contains the macros required by calling procedures in Itanium-based assembly code. 3 // 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 9 // 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. 12 // 13 14 #ifndef __IA64PROC_I__ 15 #define __IA64PROC_I__ 16 17 // 18 // Delcare the begin of assembly function entry. 19 // 20 // @param name Name of function in assembly code. 21 // 22 #define PROCEDURE_ENTRY(name) .##text; \ 23 .##type name, @function; \ 24 .##proc name; \ 25 name:: 26 27 // 28 // End of assembly function. 29 // 30 // @param name Name of function in assembly code. 31 // 32 #define PROCEDURE_EXIT(name) .##endp name 33 34 // 35 // NESTED_SETUP Requires number of locals (l) >= 3 36 // 37 #define NESTED_SETUP(i,l,o,r) \ 38 alloc loc1=ar##.##pfs,i,l,o,r ;\ 39 mov loc0=b0 40 41 // 42 // End of Nested 43 // 44 #define NESTED_RETURN \ 45 mov b0=loc0 ;\ 46 mov ar##.##pfs=loc1 ;;\ 47 br##.##ret##.##dpnt b0;; 48 49 // 50 // Export assembly function as the global function. 51 // 52 // @param Function Name of function in assembly code. 53 // 54 #define GLOBAL_FUNCTION(Function) \ 55 .##type Function, @function; \ 56 .##globl Function 57 58 #endif 59