2 // Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
3 // 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.
17 // Contains the macros needed for calling procedures in Itanium-based assembly code.
28 #define PROCEDURE_ENTRY(name) .##text; \
29 .##type name, @function; \
33 #define PROCEDURE_EXIT(name) .##endp name
35 // Note: use of 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 ;\
41 #define NESTED_RETURN \
43 mov ar##.##pfs=loc1 ;;\
44 br##.##ret##.##dpnt b0;;
47 #define INTERRUPT_HANDLER_BEGIN(name) \
48 PROCEDURE_ENTRY(name##HandlerBegin) \
50 PROCEDURE_EXIT(name##HandlerBegin)
52 #define INTERRUPT_HANDLER_END(name) \
53 PROCEDURE_ENTRY(name##HandlerEnd) \
55 PROCEDURE_EXIT(name##HandlerEnd)
58 #define INTERRUPT_HANDLER_BLOCK_BEGIN \
59 INTERRUPT_HANDLER_BEGIN(First)
61 #define INTERRUPT_HANDLER_BLOCK_END \
62 INTERRUPT_HANDLER_END(Last)