fromHudsonMacros.h revision 8012:2f71125bf413
1/*
2Copyright 1993, 1994 Hewlett-Packard Development Company, L.P.
3
4Permission is hereby granted, free of charge, to any person obtaining a copy of
5this software and associated documentation files (the "Software"), to deal in
6the Software without restriction, including without limitation the rights to
7use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8of the Software, and to permit persons to whom the Software is furnished to do
9so, subject to the following conditions:
10
11The above copyright notice and this permission notice shall be included in all
12copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20SOFTWARE.
21*/
22
23#ifndef HUDSON_MACROS_LOADED
24#define	HUDSON_MACROS_LOADED	    1
25
26/*
27 *      VID: [T1.2] PT: [Fri Apr 21 16:47:16 1995] SF: [macros.h]
28 *       TI: [/sae_users/cruz/bin/vice -iplatform.s -l// -p# -DEB164 -h -m -aeb164 ]
29 */
30/*
31**
32**  FACILITY:
33**
34**	DECchip 21164 PALcode
35**
36**  MODULE:
37**
38**	macros.h
39**
40**  MODULE DESCRIPTION:
41**
42**      DECchip 21164 PALcode macro definitions
43**
44**  AUTHOR: ER
45**
46**  CREATION DATE:  29-Nov-1993
47**
48**  $Id: fromHudsonMacros.h,v 1.1.1.1 1997/10/30 23:27:19 verghese Exp $
49**
50**  MODIFICATION HISTORY:
51**
52**  $Log: fromHudsonMacros.h,v $
53**  Revision 1.1.1.1  1997/10/30 23:27:19  verghese
54**  current 10/29/97
55**
56**  Revision 1.1  1995/11/18 01:46:23  boyle
57**  Initial revision
58**
59**  Revision 1.5  1994/07/08  17:03:12  samberg
60**  Changes to support platform specific additions
61**
62**  Revision 1.4  1994/05/20  19:24:19  ericr
63**  Moved STALL macro from osfpal.s to here
64**  Added LDLI macro
65**
66**  Revision 1.3  1994/05/20  18:08:14  ericr
67**  Changed line comments to C++ style comment character
68**
69**  Revision 1.2  1994/02/28  18:45:51  ericr
70**  Fixed EGORE related bugs
71**
72**  Revision 1.1  1993/12/16  21:55:05  eric
73**  Initial revision
74**
75**
76**--
77*/
78
79#define	STALL \
80    mfpr    r31, pt0
81
82#define	NOP \
83    bis	    $31, $31, $31
84
85/*
86** Align code on an 8K byte page boundary.
87*/
88
89#define	ALIGN_PAGE \
90    .align  13
91
92/*
93** Align code on a 32 byte block boundary.
94*/
95
96#define	ALIGN_BLOCK \
97    .align  5
98
99/*
100** Align code on a quadword boundary.
101*/
102
103#define ALIGN_BRANCH \
104    .align  3
105
106/*
107** Hardware vectors go in .text 0 sub-segment.
108*/
109
110#define	HDW_VECTOR(offset) \
111    . = offset
112
113/*
114** Privileged CALL_PAL functions are in .text 1 sub-segment.
115*/
116
117#define	CALL_PAL_PRIV(vector) \
118    . = (PAL_CALL_PAL_PRIV_ENTRY+(vector<<6))
119
120/*
121** Unprivileged CALL_PAL functions are in .text 1 sub-segment,
122** the privileged bit is removed from these vectors.
123*/
124
125#define CALL_PAL_UNPRIV(vector) \
126    . = (PAL_CALL_PAL_UNPRIV_ENTRY+((vector&0x3F)<<6))
127
128/*
129** Implements a load "immediate" longword function
130*/
131#define LDLI(reg,val) \
132        ldah	reg, ((val+0x8000) >> 16)(zero); \
133        lda	reg, (val&0xffff)(reg)
134
135
136
137#endif
138