|
|
1.1 root 1: /*-
2: * Copyright (c) 1984 The Regents of the University of California.
3: * All rights reserved.
4: *
5: * Redistribution and use in source and binary forms, with or without
6: * modification, are permitted provided that the following conditions
7: * are met:
8: * 1. Redistributions of source code must retain the above copyright
9: * notice, this list of conditions and the following disclaimer.
10: * 2. Redistributions in binary form must reproduce the above copyright
11: * notice, this list of conditions and the following disclaimer in the
12: * documentation and/or other materials provided with the distribution.
13: * 3. All advertising materials mentioning features or use of this software
14: * must display the following acknowledgement:
15: * This product includes software developed by the University of
16: * California, Berkeley and its contributors.
17: * 4. Neither the name of the University nor the names of its contributors
18: * may be used to endorse or promote products derived from this software
19: * without specific prior written permission.
20: *
21: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31: * SUCH DAMAGE.
32: */
33:
34: #ifndef lint
35: static char sccsid[] = "@(#)langpats.c 1.8 (Berkeley) 5/8/91";
36: #endif /* not lint */
37:
38: #include "inline.h"
39:
40: /*
41: * Pattern table for kernel specific routines.
42: * These patterns are based on the old asm.sed script.
43: */
44: struct pats language_ptab[] = {
45:
46: { 0, "_spl0\n",
47: " mfpr $8,r0\n\
48: mtpr $0,$8\n" },
49:
50: { 0, "_spl1\n",
51: " mfpr $8,r0\n\
52: mtpr $0x11,$8\n" },
53:
54: { 0, "_spl3\n",
55: " mfpr $8,r0\n\
56: mtpr $0x13,$8\n" },
57:
58: { 0, "_spl4\n",
59: " mfpr $8,r0\n\
60: mtpr $0x14,$8\n" },
61:
62: { 0, "_spl5\n",
63: " mfpr $8,r0\n\
64: mtpr $0x15,$8\n" },
65:
66: { 0, "_spl7\n",
67: " mfpr $8,r0\n\
68: mtpr $0x17,$8\n" },
69:
70: { 0, "_spl8\n",
71: " mfpr $8,r0\n\
72: mtpr $0x18,$8\n" },
73:
74: { 0, "_splimp\n",
75: " mfpr $8,r0\n\
76: mtpr $0x18,$8\n" },
77:
78: { 0, "_splsoftclock\n",
79: " mfpr $8,r0\n\
80: mtpr $0x8,$8\n" },
81:
82: { 0, "_splnet\n",
83: " mfpr $8,r0\n\
84: mtpr $0xc,$8\n" },
85:
86: { 0, "_splbio\n",
87: " mfpr $8,r0\n\
88: mtpr $0x18,$8\n" },
89:
90: { 0, "_spltty\n",
91: " mfpr $8,r0\n\
92: mtpr $0x18,$8\n" },
93:
94: { 0, "_splclock\n",
95: " mfpr $8,r0\n\
96: mtpr $0x18,$8\n" },
97:
98: { 0, "_splhigh\n",
99: " mfpr $8,r0\n\
100: mtpr $0x18,$8\n" },
101:
102: { 1, "_splx\n",
103: " movl (sp)+,r1\n\
104: mfpr $8,r0\n\
105: mtpr r1,$8\n" },
106:
107: { 1, "_mfpr\n",
108: " movl (sp)+,r1\n\
109: mfpr r1,r0\n" },
110:
111: { 2, "_mtpr\n",
112: " movl (sp)+,r1\n\
113: movl (sp)+,r0\n\
114: mtpr r0,r1\n" },
115:
116: #ifdef notdef
117: { 1, "_uncache\n",
118: " movl (sp)+,r1\n\
119: mtpr r1,$0x1c\n" },
120: #endif
121:
122: { 0, "_setsoftclock\n",
123: " mtpr $0x8,$0x10\n" },
124:
125: { 1, "_fuibyte\n",
126: " callf $8,_fubyte\n" },
127:
128: { 1, "_fuiword\n",
129: " callf $8,_fuword\n" },
130:
131: { 2, "_suibyte\n",
132: " callf $12,_subyte\n" },
133:
134: { 2, "_suiword\n",
135: " callf $12,_suword\n" },
136:
137: { 1, "_ffs\n",
138: " movl (sp)+,r1\n\
139: ffs r1,r0\n\
140: bgeq 1f\n\
141: mnegl $1,r0\n\
142: 1:\n\
143: incl r0\n" },
144:
145: { 2, "__insque\n",
146: " movl (sp)+,r0\n\
147: movl (sp)+,r1\n\
148: insque (r0),(r1)\n" },
149:
150: { 1, "__remque\n",
151: " movl (sp)+,r1\n\
152: remque (r1)\n" },
153:
154: { 2, "_imin\n",
155: " movl (sp)+,r0\n\
156: movl (sp)+,r1\n\
157: cmpl r0,r1\n\
158: bleq 1f\n\
159: movl r1,r0\n\
160: 1:\n" },
161:
162: { 2, "_imax\n",
163: " movl (sp)+,r0\n\
164: movl (sp)+,r1\n\
165: cmpl r0,r1\n\
166: bgeq 1f\n\
167: movl r1,r0\n\
168: 1:\n" },
169:
170: { 2, "_min\n",
171: " movl (sp)+,r0\n\
172: movl (sp)+,r1\n\
173: cmpl r0,r1\n\
174: blequ 1f\n\
175: movl r1,r0\n\
176: 1:\n" },
177:
178: { 2, "_max\n",
179: " movl (sp)+,r0\n\
180: movl (sp)+,r1\n\
181: cmpl r0,r1\n\
182: bgequ 1f\n\
183: movl r1,r0\n\
184: 1:\n" },
185:
186: { 2, "__movow\n",
187: " movl (sp)+,r1\n\
188: movl (sp)+,r0\n\
189: movow r0,(r1)\n" },
190:
191: { 2, "__movob\n",
192: " movl (sp)+,r1\n\
193: movl (sp)+,r0\n\
194: movob r0,(r1)\n" },
195:
196: { 0, "_movpsl\n",
197: " movpsl r0\n" },
198:
199: { 0, "", "" }
200: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.