]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | //++\r |
f57387d5 HT |
2 | // Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r |
3 | // This program and the accompanying materials \r | |
3eb9473e | 4 | // are licensed and made available under the terms and conditions of the BSD License \r |
5 | // which accompanies this distribution. The full text of the license may be found at \r | |
6 | // http://opensource.org/licenses/bsd-license.php \r | |
7 | // \r | |
8 | // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
9 | // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
10 | // \r | |
11 | // Module Name:\r | |
12 | //\r | |
13 | // IpfMacro.i\r | |
14 | //\r | |
15 | // Abstract:\r | |
16 | //\r | |
17 | // Contains the macros needed for calling procedures in Itanium-based assembly code.\r | |
18 | //\r | |
19 | //\r | |
20 | // Revision History:\r | |
21 | //\r | |
22 | //--\r | |
23 | \r | |
24 | #ifndef _IA64PROC_I\r | |
25 | #define _IA64PROC_I\r | |
26 | \r | |
27 | \r | |
28 | #define PROCEDURE_ENTRY(name) .##text; \\r | |
29 | .##type name, @function; \\r | |
30 | .##proc name; \\r | |
31 | name::\r | |
32 | \r | |
33 | #define PROCEDURE_EXIT(name) .##endp name\r | |
34 | \r | |
35 | // Note: use of NESTED_SETUP requires number of locals (l) >= 3\r | |
36 | \r | |
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 | |
41 | #define NESTED_RETURN \\r | |
42 | mov b0=loc0 ;\\r | |
43 | mov ar##.##pfs=loc1 ;;\\r | |
44 | br##.##ret##.##dpnt b0;;\r | |
45 | \r | |
46 | \r | |
47 | #define INTERRUPT_HANDLER_BEGIN(name) \\r | |
48 | PROCEDURE_ENTRY(name##HandlerBegin) \\r | |
49 | ;; \\r | |
50 | PROCEDURE_EXIT(name##HandlerBegin)\r | |
51 | \r | |
52 | #define INTERRUPT_HANDLER_END(name) \\r | |
53 | PROCEDURE_ENTRY(name##HandlerEnd) \\r | |
54 | ;; \\r | |
55 | PROCEDURE_EXIT(name##HandlerEnd) \r | |
56 | \r | |
57 | \r | |
58 | #define INTERRUPT_HANDLER_BLOCK_BEGIN \\r | |
59 | INTERRUPT_HANDLER_BEGIN(First)\r | |
60 | \r | |
61 | #define INTERRUPT_HANDLER_BLOCK_END \\r | |
62 | INTERRUPT_HANDLER_END(Last)\r | |
63 | \r | |
64 | \r | |
65 | \r | |
66 | #endif // _IA64PROC_I\r |