2 // Copyright (c) 2006, Intel Corporation
3 // All rights reserved. This program and the accompanying materials
4 // are licensed and made available under the terms and conditions of the BSD License
5 // which accompanies this distribution. The full text of the license may be found at
6 // http://opensource.org/licenses/bsd-license.php
8 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
9 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 // Contains the macros needed for calling procedures in Itanium-based assembly code.
22 #ifndef __IA64PROC_I__
23 #define __IA64PROC_I__
26 #define PROCEDURE_ENTRY(name) .##text; \
27 .##type name, @function; \
31 #define PROCEDURE_EXIT(name) .##endp name
33 // Note: use of NESTED_SETUP requires number of locals (l) >= 3
35 #define NESTED_SETUP(i,l,o,r) \
36 alloc loc1=ar##.##pfs,i,l,o,r ;\
39 #define NESTED_RETURN \
41 mov ar##.##pfs=loc1 ;;\
42 br##.##ret##.##dpnt b0;;
45 #define INTERRUPT_HANDLER_BEGIN(name) \
46 PROCEDURE_ENTRY(name##HandlerBegin) \
48 PROCEDURE_EXIT(name##HandlerBegin)
50 #define INTERRUPT_HANDLER_END(name) \
51 PROCEDURE_ENTRY(name##HandlerEnd) \
53 PROCEDURE_EXIT(name##HandlerEnd)
56 #define INTERRUPT_HANDLER_BLOCK_BEGIN \
57 INTERRUPT_HANDLER_BEGIN(First)
59 #define INTERRUPT_HANDLER_BLOCK_END \
60 INTERRUPT_HANDLER_END(Last)