xref: /netbsd-src/sys/external/bsd/gnu-efi/dist/lib/ia64/palproc.h (revision b2c829d73acfa2ef1ac1967460ebcec8f439b096)
1 /*	$NetBSD: palproc.h,v 1.1.1.1 2014/04/01 16:16:07 jakllsch Exp $	*/
2 
3 //
4 //
5 //       Copyright (c) 1996-99 Intel Corp.
6 //
7 //
8 //Module Name:
9 //
10 //   palproc.h
11 //
12 //Abstract:
13 //
14 //   This module contains generic macros for an IA64 assembly writer.
15 //
16 //
17 //Revision History
18 //
19 
20 #ifndef _PALPROC_H
21 #define _PALPROC_H
22 
23 #define PROCEDURE_ENTRY(name)   .##text;            \
24                 .##type name, @function;    \
25                 .##global name;           \
26                 .##proc name;           \
27 name:
28 
29 #define PROCEDURE_EXIT(name)    .##endp name
30 
31 // Note: use of NESTED_SETUP requires number of locals (l) >= 3
32 
33 #define NESTED_SETUP(i,l,o,r) \
34          alloc loc1=ar##.##pfs,i,l,o,r ;\
35          mov loc0=b0
36 
37 #define NESTED_RETURN \
38          mov b0=loc0 ;\
39          mov ar##.##pfs=loc1 ;;\
40          br##.##ret##.##dpnt  b0;;
41 
42 
43 // defines needed in palproc.s
44 
45 #define PAL_MC_CLEAR_LOG                                0x0015
46 #define PAL_MC_DRAIN                                    0x0016
47 #define PAL_MC_EXPECTED                                 0x0017
48 #define PAL_MC_DYNAMIC_STATE                            0x0018
49 #define PAL_MC_ERROR_INFO                               0x0019
50 #define PAL_MC_RESUME                                   0x001a
51 #define PAL_MC_REGISTER_MEM                             0x001b
52 
53 #endif  // _PALPROC_H
54