]>
Commit | Line | Data |
---|---|---|
959ccb23 | 1 | //++\r |
42a885c2 | 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 | |
959ccb23 | 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 | |
42a885c2 | 46 | .##globl Function\r |
47 | \r | |
48 | #define GLOBAL_OBJECT(Object) \\r | |
49 | .##type Object, @object; \\r | |
50 | .##globl Object\r | |
51 | \r | |
52 | #define GLOBAL_CONSTANT(Constant) \\r | |
53 | .##type Constant, @notype; \\r | |
54 | .##globl Constant\r | |
959ccb23 | 55 | \r |
56 | #define INTERRUPT_HANDLER_BEGIN(name) \\r | |
57 | PROCEDURE_ENTRY(name##HandlerBegin) \\r | |
58 | ;; \\r | |
59 | PROCEDURE_EXIT(name##HandlerBegin)\r | |
60 | \r | |
61 | #define INTERRUPT_HANDLER_END(name) \\r | |
62 | PROCEDURE_ENTRY(name##HandlerEnd) \\r | |
63 | ;; \\r | |
42a885c2 | 64 | PROCEDURE_EXIT(name##HandlerEnd)\r |
959ccb23 | 65 | \r |
66 | \r | |
67 | #define INTERRUPT_HANDLER_BLOCK_BEGIN \\r | |
68 | INTERRUPT_HANDLER_BEGIN(First)\r | |
69 | \r | |
70 | #define INTERRUPT_HANDLER_BLOCK_END \\r | |
71 | INTERRUPT_HANDLER_END(Last)\r | |
72 | \r | |
73 | \r | |
74 | \r | |
75 | #endif\r |