OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [hard-reg-set.h] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* Sets (bit vectors) of hard registers, and operations on them.
2
   Copyright (C) 1987, 1992, 1994, 2000, 2003, 2004, 2005
3
   Free Software Foundation, Inc.
4
 
5
This file is part of GCC
6
 
7
GCC is free software; you can redistribute it and/or modify it under
8
the terms of the GNU General Public License as published by the Free
9
Software Foundation; either version 2, or (at your option) any later
10
version.
11
 
12
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13
WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15
for more details.
16
 
17
You should have received a copy of the GNU General Public License
18
along with GCC; see the file COPYING.  If not, write to the Free
19
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
20
02110-1301, USA.  */
21
 
22
#ifndef GCC_HARD_REG_SET_H
23
#define GCC_HARD_REG_SET_H 
24
 
25
/* Define the type of a set of hard registers.  */
26
 
27
/* HARD_REG_ELT_TYPE is a typedef of the unsigned integral type which
28
   will be used for hard reg sets, either alone or in an array.
29
 
30
   If HARD_REG_SET is a macro, its definition is HARD_REG_ELT_TYPE,
31
   and it has enough bits to represent all the target machine's hard
32
   registers.  Otherwise, it is a typedef for a suitably sized array
33
   of HARD_REG_ELT_TYPEs.  HARD_REG_SET_LONGS is defined as how many.
34
 
35
   Note that lots of code assumes that the first part of a regset is
36
   the same format as a HARD_REG_SET.  To help make sure this is true,
37
   we only try the widest fast integer mode (HOST_WIDEST_FAST_INT)
38
   instead of all the smaller types.  This approach loses only if
39
   there are very few registers and then only in the few cases where
40
   we have an array of HARD_REG_SETs, so it needn't be as complex as
41
   it used to be.  */
42
 
43
typedef unsigned HOST_WIDEST_FAST_INT HARD_REG_ELT_TYPE;
44
 
45
#if FIRST_PSEUDO_REGISTER <= HOST_BITS_PER_WIDEST_FAST_INT
46
 
47
#define HARD_REG_SET HARD_REG_ELT_TYPE
48
 
49
#else
50
 
51
#define HARD_REG_SET_LONGS \
52
 ((FIRST_PSEUDO_REGISTER + HOST_BITS_PER_WIDEST_FAST_INT - 1)   \
53
  / HOST_BITS_PER_WIDEST_FAST_INT)
54
typedef HARD_REG_ELT_TYPE HARD_REG_SET[HARD_REG_SET_LONGS];
55
 
56
#endif
57
 
58
/* HARD_CONST is used to cast a constant to the appropriate type
59
   for use with a HARD_REG_SET.  */
60
 
61
#define HARD_CONST(X) ((HARD_REG_ELT_TYPE) (X))
62
 
63
/* Define macros SET_HARD_REG_BIT, CLEAR_HARD_REG_BIT and TEST_HARD_REG_BIT
64
   to set, clear or test one bit in a hard reg set of type HARD_REG_SET.
65
   All three take two arguments: the set and the register number.
66
 
67
   In the case where sets are arrays of longs, the first argument
68
   is actually a pointer to a long.
69
 
70
   Define two macros for initializing a set:
71
   CLEAR_HARD_REG_SET and SET_HARD_REG_SET.
72
   These take just one argument.
73
 
74
   Also define macros for copying hard reg sets:
75
   COPY_HARD_REG_SET and COMPL_HARD_REG_SET.
76
   These take two arguments TO and FROM; they read from FROM
77
   and store into TO.  COMPL_HARD_REG_SET complements each bit.
78
 
79
   Also define macros for combining hard reg sets:
80
   IOR_HARD_REG_SET and AND_HARD_REG_SET.
81
   These take two arguments TO and FROM; they read from FROM
82
   and combine bitwise into TO.  Define also two variants
83
   IOR_COMPL_HARD_REG_SET and AND_COMPL_HARD_REG_SET
84
   which use the complement of the set FROM.
85
 
86
   Also define GO_IF_HARD_REG_SUBSET (X, Y, TO):
87
   if X is a subset of Y, go to TO.
88
*/
89
 
90
#ifdef HARD_REG_SET
91
 
92
#define SET_HARD_REG_BIT(SET, BIT)  \
93
 ((SET) |= HARD_CONST (1) << (BIT))
94
#define CLEAR_HARD_REG_BIT(SET, BIT)  \
95
 ((SET) &= ~(HARD_CONST (1) << (BIT)))
96
#define TEST_HARD_REG_BIT(SET, BIT)  \
97
 (!!((SET) & (HARD_CONST (1) << (BIT))))
98
 
99
#define CLEAR_HARD_REG_SET(TO) ((TO) = HARD_CONST (0))
100
#define SET_HARD_REG_SET(TO) ((TO) = ~ HARD_CONST (0))
101
 
102
#define COPY_HARD_REG_SET(TO, FROM) ((TO) = (FROM))
103
#define COMPL_HARD_REG_SET(TO, FROM) ((TO) = ~(FROM))
104
 
105
#define IOR_HARD_REG_SET(TO, FROM) ((TO) |= (FROM))
106
#define IOR_COMPL_HARD_REG_SET(TO, FROM) ((TO) |= ~ (FROM))
107
#define AND_HARD_REG_SET(TO, FROM) ((TO) &= (FROM))
108
#define AND_COMPL_HARD_REG_SET(TO, FROM) ((TO) &= ~ (FROM))
109
 
110
#define GO_IF_HARD_REG_SUBSET(X,Y,TO) if (HARD_CONST (0) == ((X) & ~(Y))) goto TO
111
 
112
#define GO_IF_HARD_REG_EQUAL(X,Y,TO) if ((X) == (Y)) goto TO
113
 
114
#else
115
 
116
#define UHOST_BITS_PER_WIDE_INT ((unsigned) HOST_BITS_PER_WIDEST_FAST_INT)
117
 
118
#define SET_HARD_REG_BIT(SET, BIT)              \
119
  ((SET)[(BIT) / UHOST_BITS_PER_WIDE_INT]       \
120
   |= HARD_CONST (1) << ((BIT) % UHOST_BITS_PER_WIDE_INT))
121
 
122
#define CLEAR_HARD_REG_BIT(SET, BIT)            \
123
  ((SET)[(BIT) / UHOST_BITS_PER_WIDE_INT]       \
124
   &= ~(HARD_CONST (1) << ((BIT) % UHOST_BITS_PER_WIDE_INT)))
125
 
126
#define TEST_HARD_REG_BIT(SET, BIT)             \
127
  (!!((SET)[(BIT) / UHOST_BITS_PER_WIDE_INT]    \
128
      & (HARD_CONST (1) << ((BIT) % UHOST_BITS_PER_WIDE_INT))))
129
 
130
#if FIRST_PSEUDO_REGISTER <= 2*HOST_BITS_PER_WIDEST_FAST_INT
131
#define CLEAR_HARD_REG_SET(TO)  \
132
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                        \
133
     scan_tp_[0] = 0;                                             \
134
     scan_tp_[1] = 0; } while (0)
135
 
136
#define SET_HARD_REG_SET(TO)  \
137
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                        \
138
     scan_tp_[0] = -1;                                           \
139
     scan_tp_[1] = -1; } while (0)
140
 
141
#define COPY_HARD_REG_SET(TO, FROM)  \
142
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
143
     scan_tp_[0] = scan_fp_[0];                                   \
144
     scan_tp_[1] = scan_fp_[1]; } while (0)
145
 
146
#define COMPL_HARD_REG_SET(TO, FROM)  \
147
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
148
     scan_tp_[0] = ~ scan_fp_[0];                         \
149
     scan_tp_[1] = ~ scan_fp_[1]; } while (0)
150
 
151
#define AND_HARD_REG_SET(TO, FROM)  \
152
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
153
     scan_tp_[0] &= scan_fp_[0];                          \
154
     scan_tp_[1] &= scan_fp_[1]; } while (0)
155
 
156
#define AND_COMPL_HARD_REG_SET(TO, FROM)  \
157
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
158
     scan_tp_[0] &= ~ scan_fp_[0];                                \
159
     scan_tp_[1] &= ~ scan_fp_[1]; } while (0)
160
 
161
#define IOR_HARD_REG_SET(TO, FROM)  \
162
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
163
     scan_tp_[0] |= scan_fp_[0];                          \
164
     scan_tp_[1] |= scan_fp_[1]; } while (0)
165
 
166
#define IOR_COMPL_HARD_REG_SET(TO, FROM)  \
167
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
168
     scan_tp_[0] |= ~ scan_fp_[0];                                \
169
     scan_tp_[1] |= ~ scan_fp_[1]; } while (0)
170
 
171
#define GO_IF_HARD_REG_SUBSET(X,Y,TO)  \
172
do { HARD_REG_ELT_TYPE *scan_xp_ = (X), *scan_yp_ = (Y);        \
173
     if ((0 == (scan_xp_[0] & ~ scan_yp_[0]))                      \
174
         && (0 == (scan_xp_[1] & ~ scan_yp_[1])))                \
175
        goto TO; } while (0)
176
 
177
#define GO_IF_HARD_REG_EQUAL(X,Y,TO)  \
178
do { HARD_REG_ELT_TYPE *scan_xp_ = (X), *scan_yp_ = (Y);        \
179
     if ((scan_xp_[0] == scan_yp_[0])                             \
180
         && (scan_xp_[1] == scan_yp_[1]))                       \
181
        goto TO; } while (0)
182
 
183
#else
184
#if FIRST_PSEUDO_REGISTER <= 3*HOST_BITS_PER_WIDEST_FAST_INT
185
#define CLEAR_HARD_REG_SET(TO)  \
186
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                        \
187
     scan_tp_[0] = 0;                                             \
188
     scan_tp_[1] = 0;                                            \
189
     scan_tp_[2] = 0; } while (0)
190
 
191
#define SET_HARD_REG_SET(TO)  \
192
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                        \
193
     scan_tp_[0] = -1;                                           \
194
     scan_tp_[1] = -1;                                          \
195
     scan_tp_[2] = -1; } while (0)
196
 
197
#define COPY_HARD_REG_SET(TO, FROM)  \
198
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
199
     scan_tp_[0] = scan_fp_[0];                                   \
200
     scan_tp_[1] = scan_fp_[1];                                 \
201
     scan_tp_[2] = scan_fp_[2]; } while (0)
202
 
203
#define COMPL_HARD_REG_SET(TO, FROM)  \
204
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
205
     scan_tp_[0] = ~ scan_fp_[0];                         \
206
     scan_tp_[1] = ~ scan_fp_[1];                               \
207
     scan_tp_[2] = ~ scan_fp_[2]; } while (0)
208
 
209
#define AND_HARD_REG_SET(TO, FROM)  \
210
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
211
     scan_tp_[0] &= scan_fp_[0];                          \
212
     scan_tp_[1] &= scan_fp_[1];                                \
213
     scan_tp_[2] &= scan_fp_[2]; } while (0)
214
 
215
#define AND_COMPL_HARD_REG_SET(TO, FROM)  \
216
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
217
     scan_tp_[0] &= ~ scan_fp_[0];                                \
218
     scan_tp_[1] &= ~ scan_fp_[1];                              \
219
     scan_tp_[2] &= ~ scan_fp_[2]; } while (0)
220
 
221
#define IOR_HARD_REG_SET(TO, FROM)  \
222
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
223
     scan_tp_[0] |= scan_fp_[0];                          \
224
     scan_tp_[1] |= scan_fp_[1];                                \
225
     scan_tp_[2] |= scan_fp_[2]; } while (0)
226
 
227
#define IOR_COMPL_HARD_REG_SET(TO, FROM)  \
228
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
229
     scan_tp_[0] |= ~ scan_fp_[0];                                \
230
     scan_tp_[1] |= ~ scan_fp_[1];                              \
231
     scan_tp_[2] |= ~ scan_fp_[2]; } while (0)
232
 
233
#define GO_IF_HARD_REG_SUBSET(X,Y,TO)  \
234
do { HARD_REG_ELT_TYPE *scan_xp_ = (X), *scan_yp_ = (Y);        \
235
     if ((0 == (scan_xp_[0] & ~ scan_yp_[0]))                      \
236
         && (0 == (scan_xp_[1] & ~ scan_yp_[1]))         \
237
         && (0 == (scan_xp_[2] & ~ scan_yp_[2])))                \
238
        goto TO; } while (0)
239
 
240
#define GO_IF_HARD_REG_EQUAL(X,Y,TO)  \
241
do { HARD_REG_ELT_TYPE *scan_xp_ = (X), *scan_yp_ = (Y);        \
242
     if ((scan_xp_[0] == scan_yp_[0])                             \
243
         && (scan_xp_[1] == scan_yp_[1])                        \
244
         && (scan_xp_[2] == scan_yp_[2]))                       \
245
        goto TO; } while (0)
246
 
247
#else
248
#if FIRST_PSEUDO_REGISTER <= 4*HOST_BITS_PER_WIDEST_FAST_INT
249
#define CLEAR_HARD_REG_SET(TO)  \
250
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                        \
251
     scan_tp_[0] = 0;                                             \
252
     scan_tp_[1] = 0;                                            \
253
     scan_tp_[2] = 0;                                            \
254
     scan_tp_[3] = 0; } while (0)
255
 
256
#define SET_HARD_REG_SET(TO)  \
257
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                        \
258
     scan_tp_[0] = -1;                                           \
259
     scan_tp_[1] = -1;                                          \
260
     scan_tp_[2] = -1;                                          \
261
     scan_tp_[3] = -1; } while (0)
262
 
263
#define COPY_HARD_REG_SET(TO, FROM)  \
264
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
265
     scan_tp_[0] = scan_fp_[0];                                   \
266
     scan_tp_[1] = scan_fp_[1];                                 \
267
     scan_tp_[2] = scan_fp_[2];                                 \
268
     scan_tp_[3] = scan_fp_[3]; } while (0)
269
 
270
#define COMPL_HARD_REG_SET(TO, FROM)  \
271
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
272
     scan_tp_[0] = ~ scan_fp_[0];                         \
273
     scan_tp_[1] = ~ scan_fp_[1];                               \
274
     scan_tp_[2] = ~ scan_fp_[2];                               \
275
     scan_tp_[3] = ~ scan_fp_[3]; } while (0)
276
 
277
#define AND_HARD_REG_SET(TO, FROM)  \
278
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
279
     scan_tp_[0] &= scan_fp_[0];                          \
280
     scan_tp_[1] &= scan_fp_[1];                                \
281
     scan_tp_[2] &= scan_fp_[2];                                \
282
     scan_tp_[3] &= scan_fp_[3]; } while (0)
283
 
284
#define AND_COMPL_HARD_REG_SET(TO, FROM)  \
285
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
286
     scan_tp_[0] &= ~ scan_fp_[0];                                \
287
     scan_tp_[1] &= ~ scan_fp_[1];                              \
288
     scan_tp_[2] &= ~ scan_fp_[2];                              \
289
     scan_tp_[3] &= ~ scan_fp_[3]; } while (0)
290
 
291
#define IOR_HARD_REG_SET(TO, FROM)  \
292
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
293
     scan_tp_[0] |= scan_fp_[0];                          \
294
     scan_tp_[1] |= scan_fp_[1];                                \
295
     scan_tp_[2] |= scan_fp_[2];                                \
296
     scan_tp_[3] |= scan_fp_[3]; } while (0)
297
 
298
#define IOR_COMPL_HARD_REG_SET(TO, FROM)  \
299
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
300
     scan_tp_[0] |= ~ scan_fp_[0];                                \
301
     scan_tp_[1] |= ~ scan_fp_[1];                              \
302
     scan_tp_[2] |= ~ scan_fp_[2];                              \
303
     scan_tp_[3] |= ~ scan_fp_[3]; } while (0)
304
 
305
#define GO_IF_HARD_REG_SUBSET(X,Y,TO)  \
306
do { HARD_REG_ELT_TYPE *scan_xp_ = (X), *scan_yp_ = (Y);        \
307
     if ((0 == (scan_xp_[0] & ~ scan_yp_[0]))                      \
308
         && (0 == (scan_xp_[1] & ~ scan_yp_[1]))         \
309
         && (0 == (scan_xp_[2] & ~ scan_yp_[2]))         \
310
         && (0 == (scan_xp_[3] & ~ scan_yp_[3])))                \
311
        goto TO; } while (0)
312
 
313
#define GO_IF_HARD_REG_EQUAL(X,Y,TO)  \
314
do { HARD_REG_ELT_TYPE *scan_xp_ = (X), *scan_yp_ = (Y);        \
315
     if ((scan_xp_[0] == scan_yp_[0])                             \
316
         && (scan_xp_[1] == scan_yp_[1])                        \
317
         && (scan_xp_[2] == scan_yp_[2])                        \
318
         && (scan_xp_[3] == scan_yp_[3]))                       \
319
        goto TO; } while (0)
320
 
321
#else /* FIRST_PSEUDO_REGISTER > 3*HOST_BITS_PER_WIDEST_FAST_INT */
322
 
323
#define CLEAR_HARD_REG_SET(TO)  \
324
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                        \
325
     int i;                                                     \
326
     for (i = 0; i < HARD_REG_SET_LONGS; i++)                    \
327
       *scan_tp_++ = 0; } while (0)
328
 
329
#define SET_HARD_REG_SET(TO)  \
330
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                        \
331
     int i;                                                     \
332
     for (i = 0; i < HARD_REG_SET_LONGS; i++)                    \
333
       *scan_tp_++ = -1; } while (0)
334
 
335
#define COPY_HARD_REG_SET(TO, FROM)  \
336
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
337
     int i;                                                     \
338
     for (i = 0; i < HARD_REG_SET_LONGS; i++)                    \
339
       *scan_tp_++ = *scan_fp_++; } while (0)
340
 
341
#define COMPL_HARD_REG_SET(TO, FROM)  \
342
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
343
     int i;                                                     \
344
     for (i = 0; i < HARD_REG_SET_LONGS; i++)                    \
345
       *scan_tp_++ = ~ *scan_fp_++; } while (0)
346
 
347
#define AND_HARD_REG_SET(TO, FROM)  \
348
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
349
     int i;                                                     \
350
     for (i = 0; i < HARD_REG_SET_LONGS; i++)                    \
351
       *scan_tp_++ &= *scan_fp_++; } while (0)
352
 
353
#define AND_COMPL_HARD_REG_SET(TO, FROM)  \
354
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
355
     int i;                                                     \
356
     for (i = 0; i < HARD_REG_SET_LONGS; i++)                    \
357
       *scan_tp_++ &= ~ *scan_fp_++; } while (0)
358
 
359
#define IOR_HARD_REG_SET(TO, FROM)  \
360
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
361
     int i;                                                     \
362
     for (i = 0; i < HARD_REG_SET_LONGS; i++)                    \
363
       *scan_tp_++ |= *scan_fp_++; } while (0)
364
 
365
#define IOR_COMPL_HARD_REG_SET(TO, FROM)  \
366
do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);    \
367
     int i;                                                     \
368
     for (i = 0; i < HARD_REG_SET_LONGS; i++)                    \
369
       *scan_tp_++ |= ~ *scan_fp_++; } while (0)
370
 
371
#define GO_IF_HARD_REG_SUBSET(X,Y,TO)  \
372
do { HARD_REG_ELT_TYPE *scan_xp_ = (X), *scan_yp_ = (Y);        \
373
     int i;                                                     \
374
     for (i = 0; i < HARD_REG_SET_LONGS; i++)                    \
375
       if (0 != (*scan_xp_++ & ~ *scan_yp_++)) break;            \
376
     if (i == HARD_REG_SET_LONGS) goto TO; } while (0)
377
 
378
#define GO_IF_HARD_REG_EQUAL(X,Y,TO)  \
379
do { HARD_REG_ELT_TYPE *scan_xp_ = (X), *scan_yp_ = (Y);        \
380
     int i;                                                     \
381
     for (i = 0; i < HARD_REG_SET_LONGS; i++)                    \
382
       if (*scan_xp_++ != *scan_yp_++) break;                   \
383
     if (i == HARD_REG_SET_LONGS) goto TO; } while (0)
384
 
385
#endif
386
#endif
387
#endif
388
#endif
389
 
390
/* Define some standard sets of registers.  */
391
 
392
/* Indexed by hard register number, contains 1 for registers
393
   that are fixed use (stack pointer, pc, frame pointer, etc.).
394
   These are the registers that cannot be used to allocate
395
   a pseudo reg whose life does not cross calls.  */
396
 
397
extern char fixed_regs[FIRST_PSEUDO_REGISTER];
398
 
399
/* The same info as a HARD_REG_SET.  */
400
 
401
extern HARD_REG_SET fixed_reg_set;
402
 
403
/* Indexed by hard register number, contains 1 for registers
404
   that are fixed use or are clobbered by function calls.
405
   These are the registers that cannot be used to allocate
406
   a pseudo reg whose life crosses calls.  */
407
 
408
extern char call_used_regs[FIRST_PSEUDO_REGISTER];
409
 
410
#ifdef CALL_REALLY_USED_REGISTERS
411
extern char call_really_used_regs[];
412
#endif
413
 
414
/* The same info as a HARD_REG_SET.  */
415
 
416
extern HARD_REG_SET call_used_reg_set;
417
 
418
/* Registers that we don't want to caller save.  */
419
extern HARD_REG_SET losing_caller_save_reg_set;
420
 
421
/* Indexed by hard register number, contains 1 for registers that are
422
   fixed use -- i.e. in fixed_regs -- or a function value return register
423
   or TARGET_STRUCT_VALUE_RTX or STATIC_CHAIN_REGNUM.  These are the
424
   registers that cannot hold quantities across calls even if we are
425
   willing to save and restore them.  */
426
 
427
extern char call_fixed_regs[FIRST_PSEUDO_REGISTER];
428
 
429
/* The same info as a HARD_REG_SET.  */
430
 
431
extern HARD_REG_SET call_fixed_reg_set;
432
 
433
/* Indexed by hard register number, contains 1 for registers
434
   that are being used for global register decls.
435
   These must be exempt from ordinary flow analysis
436
   and are also considered fixed.  */
437
 
438
extern char global_regs[FIRST_PSEUDO_REGISTER];
439
 
440
/* Contains 1 for registers that are set or clobbered by calls.  */
441
/* ??? Ideally, this would be just call_used_regs plus global_regs, but
442
   for someone's bright idea to have call_used_regs strictly include
443
   fixed_regs.  Which leaves us guessing as to the set of fixed_regs
444
   that are actually preserved.  We know for sure that those associated
445
   with the local stack frame are safe, but scant others.  */
446
 
447
extern HARD_REG_SET regs_invalidated_by_call;
448
 
449
#ifdef REG_ALLOC_ORDER
450
/* Table of register numbers in the order in which to try to use them.  */
451
 
452
extern int reg_alloc_order[FIRST_PSEUDO_REGISTER];
453
 
454
/* The inverse of reg_alloc_order.  */
455
 
456
extern int inv_reg_alloc_order[FIRST_PSEUDO_REGISTER];
457
#endif
458
 
459
/* For each reg class, a HARD_REG_SET saying which registers are in it.  */
460
 
461
extern HARD_REG_SET reg_class_contents[N_REG_CLASSES];
462
 
463
/* For each reg class, number of regs it contains.  */
464
 
465
extern unsigned int reg_class_size[N_REG_CLASSES];
466
 
467
/* For each pair of reg classes,
468
   a largest reg class contained in their union.  */
469
 
470
extern enum reg_class reg_class_subunion[N_REG_CLASSES][N_REG_CLASSES];
471
 
472
/* For each pair of reg classes,
473
   the smallest reg class that contains their union.  */
474
 
475
extern enum reg_class reg_class_superunion[N_REG_CLASSES][N_REG_CLASSES];
476
 
477
/* Number of non-fixed registers.  */
478
 
479
extern int n_non_fixed_regs;
480
 
481
/* Vector indexed by hardware reg giving its name.  */
482
 
483
extern const char * reg_names[FIRST_PSEUDO_REGISTER];
484
 
485
/* Vector indexed by reg class giving its name.  */
486
 
487
extern const char * reg_class_names[];
488
 
489
/* Given a hard REGN a FROM mode and a TO mode, return nonzero if
490
   REGN cannot change modes between the specified modes.  */
491
#define REG_CANNOT_CHANGE_MODE_P(REGN, FROM, TO)                          \
492
         CANNOT_CHANGE_MODE_CLASS (FROM, TO, REGNO_REG_CLASS (REGN))
493
 
494
#endif /* ! GCC_HARD_REG_SET_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.