]>
Commit | Line | Data |
---|---|---|
1 | //++\r | |
2 | // Copyright (c) 2006, Intel Corporation \r | |
3 | // All rights reserved. This program and the accompanying materials \r | |
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 | // IpfMacro.i\r | |
13 | //\r | |
14 | // Abstract:\r | |
15 | // Contains the macros needed for calling procedures in Itanium-based assembly code.\r | |
16 | //\r | |
17 | //\r | |
18 | // Revision History:\r | |
19 | //\r | |
20 | //--\r | |
21 | \r | |
22 | #ifndef __IA64PROC_I__\r | |
23 | #define __IA64PROC_I__\r | |
24 | \r | |
25 | \r | |
26 | #define PROCEDURE_ENTRY(name) .##text; \\r | |
27 | .##type name, @function; \\r | |
28 | .##proc name; \\r | |
29 | name::\r | |
30 | \r | |
31 | #define PROCEDURE_EXIT(name) .##endp name\r | |
32 | \r | |
33 | // Note: use of NESTED_SETUP requires number of locals (l) >= 3\r | |
34 | \r | |
35 | #define NESTED_SETUP(i,l,o,r) \\r | |
36 | alloc loc1=ar##.##pfs,i,l,o,r ;\\r | |
37 | mov loc0=b0\r | |
38 | \r | |
39 | #define NESTED_RETURN \\r | |
40 | mov b0=loc0 ;\\r | |
41 | mov ar##.##pfs=loc1 ;;\\r | |
42 | br##.##ret##.##dpnt b0;;\r | |
43 | \r | |
44 | #define GLOBAL_FUNCTION(Function) \\r | |
45 | .##type Function, @function; \\r | |
46 | .##global Function\r | |
47 | \r | |
48 | #define INTERRUPT_HANDLER_BEGIN(name) \\r | |
49 | PROCEDURE_ENTRY(name##HandlerBegin) \\r | |
50 | ;; \\r | |
51 | PROCEDURE_EXIT(name##HandlerBegin)\r | |
52 | \r | |
53 | #define INTERRUPT_HANDLER_END(name) \\r | |
54 | PROCEDURE_ENTRY(name##HandlerEnd) \\r | |
55 | ;; \\r | |
56 | PROCEDURE_EXIT(name##HandlerEnd) \r | |
57 | \r | |
58 | \r | |
59 | #define INTERRUPT_HANDLER_BLOCK_BEGIN \\r | |
60 | INTERRUPT_HANDLER_BEGIN(First)\r | |
61 | \r | |
62 | #define INTERRUPT_HANDLER_BLOCK_END \\r | |
63 | INTERRUPT_HANDLER_END(Last)\r | |
64 | \r | |
65 | \r | |
66 | \r | |
67 | #endif\r |