source: mainline/uspace/app/pcc/cc/ccom/arch/mips32/external.c@ 48fa501

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 48fa501 was 5974661, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 14 years ago

Add a separate directory for each platform's external.{c,h}. Add mkext utility for generating those to the build.

  • Property mode set to 100644
File size: 4.7 KB
Line 
1#include "pass2.h"
2
3// TODO: replace with file generated by ccom_mkext
4
5static int op0[] = { -1 };
6static int op1[] = { -1 };
7static int op2[] = { -1 };
8static int op3[] = { -1 };
9static int op4[] = { -1 };
10static int op5[] = { -1 };
11static int op6[] = { -1 };
12static int op7[] = { -1 };
13static int op8[] = { -1 };
14static int op9[] = { -1 };
15static int op10[] = { -1 };
16static int op11[] = { -1 };
17static int op12[] = { -1 };
18static int op13[] = { -1 };
19static int op14[] = { -1 };
20static int op15[] = { -1 };
21static int op16[] = { -1 };
22static int op17[] = { -1 };
23static int op18[] = { -1 };
24static int op19[] = { -1 };
25static int op20[] = { -1 };
26static int op21[] = { -1 };
27static int op22[] = { -1 };
28static int op23[] = { -1 };
29static int op24[] = { -1 };
30static int op25[] = { -1 };
31static int op26[] = { -1 };
32static int op27[] = { -1 };
33static int op28[] = { -1 };
34static int op29[] = { -1 };
35static int op30[] = { -1 };
36static int op31[] = { -1 };
37static int op32[] = { -1 };
38static int op33[] = { -1 };
39static int op34[] = { -1 };
40static int op35[] = { -1 };
41static int op36[] = { -1 };
42static int op37[] = { -1 };
43static int op38[] = { -1 };
44static int op39[] = { -1 };
45static int op40[] = { -1 };
46static int op41[] = { -1 };
47static int op42[] = { -1 };
48static int op43[] = { -1 };
49static int op44[] = { -1 };
50static int op45[] = { -1 };
51static int op46[] = { -1 };
52static int op47[] = { -1 };
53static int op48[] = { -1 };
54static int op49[] = { -1 };
55static int op50[] = { -1 };
56static int op51[] = { -1 };
57static int op52[] = { -1 };
58static int op53[] = { -1 };
59static int op54[] = { -1 };
60static int op55[] = { -1 };
61static int op56[] = { -1 };
62static int op57[] = { -1 };
63static int op58[] = { -1 };
64
65int *qtable[] = {
66 op0,
67 op1,
68 op2,
69 op3,
70 op4,
71 op5,
72 op6,
73 op7,
74 op8,
75 op9,
76 op10,
77 op11,
78 op12,
79 op13,
80 op14,
81 op15,
82 op16,
83 op17,
84 op18,
85 op19,
86 op20,
87 op21,
88 op22,
89 op23,
90 op24,
91 op25,
92 op26,
93 op27,
94 op28,
95 op29,
96 op30,
97 op31,
98 op32,
99 op33,
100 op34,
101 op35,
102 op36,
103 op37,
104 op38,
105 op39,
106 op40,
107 op41,
108 op42,
109 op43,
110 op44,
111 op45,
112 op46,
113 op47,
114 op48,
115 op49,
116 op50,
117 op51,
118 op52,
119 op53,
120 op54,
121 op55,
122 op56,
123 op57,
124 op58,
125};
126int tempregs[] = { -1 };
127int permregs[] = { -1 };
128bittype validregs[] = {
129 0x7fffffffff,
130};
131static int amap[MAXREGS][NUMCLASS] = {
132 /* 0 */{ 0x0,0x0,0x0,0x0 },
133 /* 1 */{ 0x0,0x0,0x0,0x0 },
134 /* 2 */{ 0x0,0x0,0x0,0x0 },
135 /* 3 */{ 0x0,0x0,0x0,0x0 },
136 /* 4 */{ 0x0,0x0,0x0,0x0 },
137 /* 5 */{ 0x0,0x0,0x0,0x0 },
138 /* 6 */{ 0x0,0x0,0x0,0x0 },
139 /* 7 */{ 0x0,0x0,0x0,0x0 },
140 /* 8 */{ 0x0,0x0,0x0,0x0 },
141 /* 9 */{ 0x0,0x0,0x0,0x0 },
142 /* 10 */{ 0x0,0x0,0x0,0x0 },
143 /* 11 */{ 0x0,0x0,0x0,0x0 },
144 /* 12 */{ 0x0,0x0,0x0,0x0 },
145 /* 13 */{ 0x0,0x0,0x0,0x0 },
146 /* 14 */{ 0x0,0x0,0x0,0x0 },
147 /* 15 */{ 0x0,0x0,0x0,0x0 },
148 /* 16 */{ 0x0,0x0,0x0,0x0 },
149 /* 17 */{ 0x0,0x0,0x0,0x0 },
150 /* 18 */{ 0x0,0x0,0x0,0x0 },
151 /* 19 */{ 0x0,0x0,0x0,0x0 },
152 /* 20 */{ 0x0,0x0,0x0,0x0 },
153 /* 21 */{ 0x0,0x0,0x0,0x0 },
154 /* 22 */{ 0x0,0x0,0x0,0x0 },
155 /* 23 */{ 0x0,0x0,0x0,0x0 },
156 /* 24 */{ 0x0,0x0,0x0,0x0 },
157 /* 25 */{ 0x0,0x0,0x0,0x0 },
158 /* 26 */{ 0x0,0x0,0x0,0x0 },
159 /* 27 */{ 0x0,0x0,0x0,0x0 },
160 /* 28 */{ 0x0,0x0,0x0,0x0 },
161 /* 29 */{ 0x0,0x0,0x0,0x0 },
162 /* 30 */{ 0x0,0x0,0x0,0x0 },
163 /* 31 */{ 0x0,0x0,0x0,0x0 },
164 /* 32 */{ 0x0,0x0,0x0,0x0 },
165 /* 33 */{ 0x0,0x0,0x0,0x0 },
166 /* 34 */{ 0x0,0x0,0x0,0x0 },
167 /* 35 */{ 0x0,0x0,0x0,0x0 },
168 /* 36 */{ 0x0,0x0,0x0,0x0 },
169 /* 37 */{ 0x0,0x0,0x0,0x0 },
170 /* 38 */{ 0x0,0x0,0x0,0x0 }
171};
172int
173aliasmap(int class, int regnum)
174{
175 return amap[regnum][class-1];
176}
177static int rmap[NUMCLASS][15] = {
178 { 0, 1, 2, 3, 4, 5, },
179 { 8, 9, 10, 11, 12, 13, 14, 15, },
180 { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, },
181 { 31, 32, 33, 34, 35, 36, 37, 38, },
182};
183
184int
185color2reg(int color, int class)
186{
187 return rmap[class-1][color];
188}
189int regK[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
190int
191classmask(int class)
192{
193 if(class == CLASSA) return 0x0;
194 if(class == CLASSB) return 0x0;
195 if(class == CLASSC) return 0x0;
196 if(class == CLASSD) return 0x0;
197 if(class == CLASSE) return 0x0;
198 if(class == CLASSF) return 0x0;
199 return 0x0;
200}
201static bittype ovlarr[MAXREGS][1] = {
202{ 0x1f0301, },
203{ 0x1e10c02, },
204{ 0xe223004, },
205{ 0x3244c008, },
206{ 0x54880010, },
207{ 0x69100020, },
208{ 0x40, },
209{ 0x80, },
210{ 0x1f0101, },
211{ 0x1f0201, },
212{ 0x1e10402, },
213{ 0x1e10802, },
214{ 0xe221004, },
215{ 0xe222004, },
216{ 0x32444008, },
217{ 0x32448008, },
218{ 0x1ff0f03, },
219{ 0xe3f3305, },
220{ 0x325fc309, },
221{ 0x549f0311, },
222{ 0x691f0321, },
223{ 0xfe33c06, },
224{ 0x33e5cc0a, },
225{ 0x55e90c12, },
226{ 0x69f10c22, },
227{ 0x3e66f00c, },
228{ 0x5eaa3014, },
229{ 0x6f323024, },
230{ 0x76ccc018, },
231{ 0x7b54c028, },
232{ 0x7d980030, },
233{ 0x80000000, },
234{ 0x1, },
235{ 0x2, },
236{ 0x4, },
237{ 0x8, },
238{ 0x10, },
239{ 0x20, },
240{ 0x40, },
241};
242int
243interferes(int reg1, int reg2)
244{
245return (TESTBIT(ovlarr[reg1], reg2)) != 0;
246}
Note: See TracBrowser for help on using the repository browser.