Updated for libbid move.
[official-gcc.git] / gcc / hard-reg-set.h
blobc5b456fea32183eb128124031b0756c850d59d84
1 /* 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.
5 This file is part of GCC
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.
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.
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. */
22 #ifndef GCC_HARD_REG_SET_H
23 #define GCC_HARD_REG_SET_H
25 /* Define the type of a set of hard registers. */
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.
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.
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. */
43 typedef unsigned HOST_WIDEST_FAST_INT HARD_REG_ELT_TYPE;
45 #if FIRST_PSEUDO_REGISTER <= HOST_BITS_PER_WIDEST_FAST_INT
47 #define HARD_REG_SET HARD_REG_ELT_TYPE
49 #else
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];
56 #endif
58 /* HARD_CONST is used to cast a constant to the appropriate type
59 for use with a HARD_REG_SET. */
61 #define HARD_CONST(X) ((HARD_REG_ELT_TYPE) (X))
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.
67 In the case where sets are arrays of longs, the first argument
68 is actually a pointer to a long.
70 Define two macros for initializing a set:
71 CLEAR_HARD_REG_SET and SET_HARD_REG_SET.
72 These take just one argument.
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.
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.
86 Also define:
88 hard_reg_set_subset_p (X, Y), which returns true if X is a subset of Y.
89 hard_reg_set_equal_p (X, Y), which returns true if X and Y are equal.
90 hard_reg_set_intersect_p (X, Y), which returns true if X and Y intersect.
91 hard_reg_set_empty_p (X), which returns true if X is empty. */
93 #ifdef HARD_REG_SET
95 #define SET_HARD_REG_BIT(SET, BIT) \
96 ((SET) |= HARD_CONST (1) << (BIT))
97 #define CLEAR_HARD_REG_BIT(SET, BIT) \
98 ((SET) &= ~(HARD_CONST (1) << (BIT)))
99 #define TEST_HARD_REG_BIT(SET, BIT) \
100 (!!((SET) & (HARD_CONST (1) << (BIT))))
102 #define CLEAR_HARD_REG_SET(TO) ((TO) = HARD_CONST (0))
103 #define SET_HARD_REG_SET(TO) ((TO) = ~ HARD_CONST (0))
105 #define COPY_HARD_REG_SET(TO, FROM) ((TO) = (FROM))
106 #define COMPL_HARD_REG_SET(TO, FROM) ((TO) = ~(FROM))
108 #define IOR_HARD_REG_SET(TO, FROM) ((TO) |= (FROM))
109 #define IOR_COMPL_HARD_REG_SET(TO, FROM) ((TO) |= ~ (FROM))
110 #define AND_HARD_REG_SET(TO, FROM) ((TO) &= (FROM))
111 #define AND_COMPL_HARD_REG_SET(TO, FROM) ((TO) &= ~ (FROM))
113 static inline bool
114 hard_reg_set_subset_p (const HARD_REG_SET x, const HARD_REG_SET y)
116 return (x & ~y) == HARD_CONST (0);
119 static inline bool
120 hard_reg_set_equal_p (const HARD_REG_SET x, const HARD_REG_SET y)
122 return x == y;
125 static inline bool
126 hard_reg_set_intersect_p (const HARD_REG_SET x, const HARD_REG_SET y)
128 return (x & y) != HARD_CONST (0);
131 static inline bool
132 hard_reg_set_empty_p (const HARD_REG_SET x)
134 return x == HARD_CONST (0);
137 #else
139 #define UHOST_BITS_PER_WIDE_INT ((unsigned) HOST_BITS_PER_WIDEST_FAST_INT)
141 #define SET_HARD_REG_BIT(SET, BIT) \
142 ((SET)[(BIT) / UHOST_BITS_PER_WIDE_INT] \
143 |= HARD_CONST (1) << ((BIT) % UHOST_BITS_PER_WIDE_INT))
145 #define CLEAR_HARD_REG_BIT(SET, BIT) \
146 ((SET)[(BIT) / UHOST_BITS_PER_WIDE_INT] \
147 &= ~(HARD_CONST (1) << ((BIT) % UHOST_BITS_PER_WIDE_INT)))
149 #define TEST_HARD_REG_BIT(SET, BIT) \
150 (!!((SET)[(BIT) / UHOST_BITS_PER_WIDE_INT] \
151 & (HARD_CONST (1) << ((BIT) % UHOST_BITS_PER_WIDE_INT))))
153 #if FIRST_PSEUDO_REGISTER <= 2*HOST_BITS_PER_WIDEST_FAST_INT
154 #define CLEAR_HARD_REG_SET(TO) \
155 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \
156 scan_tp_[0] = 0; \
157 scan_tp_[1] = 0; } while (0)
159 #define SET_HARD_REG_SET(TO) \
160 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \
161 scan_tp_[0] = -1; \
162 scan_tp_[1] = -1; } while (0)
164 #define COPY_HARD_REG_SET(TO, FROM) \
165 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
166 scan_tp_[0] = scan_fp_[0]; \
167 scan_tp_[1] = scan_fp_[1]; } while (0)
169 #define COMPL_HARD_REG_SET(TO, FROM) \
170 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
171 scan_tp_[0] = ~ scan_fp_[0]; \
172 scan_tp_[1] = ~ scan_fp_[1]; } while (0)
174 #define AND_HARD_REG_SET(TO, FROM) \
175 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
176 scan_tp_[0] &= scan_fp_[0]; \
177 scan_tp_[1] &= scan_fp_[1]; } while (0)
179 #define AND_COMPL_HARD_REG_SET(TO, FROM) \
180 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
181 scan_tp_[0] &= ~ scan_fp_[0]; \
182 scan_tp_[1] &= ~ scan_fp_[1]; } while (0)
184 #define IOR_HARD_REG_SET(TO, FROM) \
185 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
186 scan_tp_[0] |= scan_fp_[0]; \
187 scan_tp_[1] |= scan_fp_[1]; } while (0)
189 #define IOR_COMPL_HARD_REG_SET(TO, FROM) \
190 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
191 scan_tp_[0] |= ~ scan_fp_[0]; \
192 scan_tp_[1] |= ~ scan_fp_[1]; } while (0)
194 static inline bool
195 hard_reg_set_subset_p (const HARD_REG_SET x, const HARD_REG_SET y)
197 return (x[0] & ~y[0]) == 0 && (x[1] & ~y[1]) == 0;
200 static inline bool
201 hard_reg_set_equal_p (const HARD_REG_SET x, const HARD_REG_SET y)
203 return x[0] == y[0] && x[1] == y[1];
206 static inline bool
207 hard_reg_set_intersect_p (const HARD_REG_SET x, const HARD_REG_SET y)
209 return (x[0] & y[0]) != 0 || (x[1] & y[1]) != 0;
212 static inline bool
213 hard_reg_set_empty_p (const HARD_REG_SET x)
215 return x[0] == 0 && x[1] == 0;
218 #else
219 #if FIRST_PSEUDO_REGISTER <= 3*HOST_BITS_PER_WIDEST_FAST_INT
220 #define CLEAR_HARD_REG_SET(TO) \
221 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \
222 scan_tp_[0] = 0; \
223 scan_tp_[1] = 0; \
224 scan_tp_[2] = 0; } while (0)
226 #define SET_HARD_REG_SET(TO) \
227 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \
228 scan_tp_[0] = -1; \
229 scan_tp_[1] = -1; \
230 scan_tp_[2] = -1; } while (0)
232 #define COPY_HARD_REG_SET(TO, FROM) \
233 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
234 scan_tp_[0] = scan_fp_[0]; \
235 scan_tp_[1] = scan_fp_[1]; \
236 scan_tp_[2] = scan_fp_[2]; } while (0)
238 #define COMPL_HARD_REG_SET(TO, FROM) \
239 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
240 scan_tp_[0] = ~ scan_fp_[0]; \
241 scan_tp_[1] = ~ scan_fp_[1]; \
242 scan_tp_[2] = ~ scan_fp_[2]; } while (0)
244 #define AND_HARD_REG_SET(TO, FROM) \
245 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
246 scan_tp_[0] &= scan_fp_[0]; \
247 scan_tp_[1] &= scan_fp_[1]; \
248 scan_tp_[2] &= scan_fp_[2]; } while (0)
250 #define AND_COMPL_HARD_REG_SET(TO, FROM) \
251 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
252 scan_tp_[0] &= ~ scan_fp_[0]; \
253 scan_tp_[1] &= ~ scan_fp_[1]; \
254 scan_tp_[2] &= ~ scan_fp_[2]; } while (0)
256 #define IOR_HARD_REG_SET(TO, FROM) \
257 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
258 scan_tp_[0] |= scan_fp_[0]; \
259 scan_tp_[1] |= scan_fp_[1]; \
260 scan_tp_[2] |= scan_fp_[2]; } while (0)
262 #define IOR_COMPL_HARD_REG_SET(TO, FROM) \
263 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
264 scan_tp_[0] |= ~ scan_fp_[0]; \
265 scan_tp_[1] |= ~ scan_fp_[1]; \
266 scan_tp_[2] |= ~ scan_fp_[2]; } while (0)
268 static inline bool
269 hard_reg_set_subset_p (const HARD_REG_SET x, const HARD_REG_SET y)
271 return ((x[0] & ~y[0]) == 0
272 && (x[1] & ~y[1]) == 0
273 && (x[2] & ~y[2]) == 0);
276 static inline bool
277 hard_reg_set_equal_p (const HARD_REG_SET x, const HARD_REG_SET y)
279 return x[0] == y[0] && x[1] == y[1] && x[2] == y[2];
282 static inline bool
283 hard_reg_set_intersect_p (const HARD_REG_SET x, const HARD_REG_SET y)
285 return ((x[0] & y[0]) != 0
286 || (x[1] & y[1]) != 0
287 || (x[2] & y[2]) != 0);
290 static inline bool
291 hard_reg_set_empty_p (const HARD_REG_SET x)
293 return x[0] == 0 && x[1] == 0 && x[2] == 0;
296 #else
297 #if FIRST_PSEUDO_REGISTER <= 4*HOST_BITS_PER_WIDEST_FAST_INT
298 #define CLEAR_HARD_REG_SET(TO) \
299 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \
300 scan_tp_[0] = 0; \
301 scan_tp_[1] = 0; \
302 scan_tp_[2] = 0; \
303 scan_tp_[3] = 0; } while (0)
305 #define SET_HARD_REG_SET(TO) \
306 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \
307 scan_tp_[0] = -1; \
308 scan_tp_[1] = -1; \
309 scan_tp_[2] = -1; \
310 scan_tp_[3] = -1; } while (0)
312 #define COPY_HARD_REG_SET(TO, FROM) \
313 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
314 scan_tp_[0] = scan_fp_[0]; \
315 scan_tp_[1] = scan_fp_[1]; \
316 scan_tp_[2] = scan_fp_[2]; \
317 scan_tp_[3] = scan_fp_[3]; } while (0)
319 #define COMPL_HARD_REG_SET(TO, FROM) \
320 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
321 scan_tp_[0] = ~ scan_fp_[0]; \
322 scan_tp_[1] = ~ scan_fp_[1]; \
323 scan_tp_[2] = ~ scan_fp_[2]; \
324 scan_tp_[3] = ~ scan_fp_[3]; } while (0)
326 #define AND_HARD_REG_SET(TO, FROM) \
327 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
328 scan_tp_[0] &= scan_fp_[0]; \
329 scan_tp_[1] &= scan_fp_[1]; \
330 scan_tp_[2] &= scan_fp_[2]; \
331 scan_tp_[3] &= scan_fp_[3]; } while (0)
333 #define AND_COMPL_HARD_REG_SET(TO, FROM) \
334 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
335 scan_tp_[0] &= ~ scan_fp_[0]; \
336 scan_tp_[1] &= ~ scan_fp_[1]; \
337 scan_tp_[2] &= ~ scan_fp_[2]; \
338 scan_tp_[3] &= ~ scan_fp_[3]; } while (0)
340 #define IOR_HARD_REG_SET(TO, FROM) \
341 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
342 scan_tp_[0] |= scan_fp_[0]; \
343 scan_tp_[1] |= scan_fp_[1]; \
344 scan_tp_[2] |= scan_fp_[2]; \
345 scan_tp_[3] |= scan_fp_[3]; } while (0)
347 #define IOR_COMPL_HARD_REG_SET(TO, FROM) \
348 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
349 scan_tp_[0] |= ~ scan_fp_[0]; \
350 scan_tp_[1] |= ~ scan_fp_[1]; \
351 scan_tp_[2] |= ~ scan_fp_[2]; \
352 scan_tp_[3] |= ~ scan_fp_[3]; } while (0)
354 static inline bool
355 hard_reg_set_subset_p (const HARD_REG_SET x, const HARD_REG_SET y)
357 return ((x[0] & ~y[0]) == 0
358 && (x[1] & ~y[1]) == 0
359 && (x[2] & ~y[2]) == 0
360 && (x[3] & ~y[3]) == 0);
363 static inline bool
364 hard_reg_set_equal_p (const HARD_REG_SET x, const HARD_REG_SET y)
366 return x[0] == y[0] && x[1] == y[1] && x[2] == y[2] && x[3] == y[3];
369 static inline bool
370 hard_reg_set_intersect_p (const HARD_REG_SET x, const HARD_REG_SET y)
372 return ((x[0] & y[0]) != 0
373 || (x[1] & y[1]) != 0
374 || (x[2] & y[2]) != 0
375 || (x[3] & y[3]) != 0);
378 static inline bool
379 hard_reg_set_empty_p (const HARD_REG_SET x)
381 return x[0] == 0 && x[1] == 0 && x[2] == 0 && x[3] == 0;
384 #else /* FIRST_PSEUDO_REGISTER > 3*HOST_BITS_PER_WIDEST_FAST_INT */
386 #define CLEAR_HARD_REG_SET(TO) \
387 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \
388 int i; \
389 for (i = 0; i < HARD_REG_SET_LONGS; i++) \
390 *scan_tp_++ = 0; } while (0)
392 #define SET_HARD_REG_SET(TO) \
393 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \
394 int i; \
395 for (i = 0; i < HARD_REG_SET_LONGS; i++) \
396 *scan_tp_++ = -1; } while (0)
398 #define COPY_HARD_REG_SET(TO, FROM) \
399 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
400 int i; \
401 for (i = 0; i < HARD_REG_SET_LONGS; i++) \
402 *scan_tp_++ = *scan_fp_++; } while (0)
404 #define COMPL_HARD_REG_SET(TO, FROM) \
405 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
406 int i; \
407 for (i = 0; i < HARD_REG_SET_LONGS; i++) \
408 *scan_tp_++ = ~ *scan_fp_++; } while (0)
410 #define AND_HARD_REG_SET(TO, FROM) \
411 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
412 int i; \
413 for (i = 0; i < HARD_REG_SET_LONGS; i++) \
414 *scan_tp_++ &= *scan_fp_++; } while (0)
416 #define AND_COMPL_HARD_REG_SET(TO, FROM) \
417 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
418 int i; \
419 for (i = 0; i < HARD_REG_SET_LONGS; i++) \
420 *scan_tp_++ &= ~ *scan_fp_++; } while (0)
422 #define IOR_HARD_REG_SET(TO, FROM) \
423 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
424 int i; \
425 for (i = 0; i < HARD_REG_SET_LONGS; i++) \
426 *scan_tp_++ |= *scan_fp_++; } while (0)
428 #define IOR_COMPL_HARD_REG_SET(TO, FROM) \
429 do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \
430 int i; \
431 for (i = 0; i < HARD_REG_SET_LONGS; i++) \
432 *scan_tp_++ |= ~ *scan_fp_++; } while (0)
434 static inline bool
435 hard_reg_set_subset_p (const HARD_REG_SET x, const HARD_REG_SET y)
437 int i;
439 for (i = 0; i < HARD_REG_SET_LONGS; i++)
440 if ((x[i] & ~y[i]) != 0)
441 return false;
442 return true;
445 static inline bool
446 hard_reg_set_equal_p (const HARD_REG_SET x, const HARD_REG_SET y)
448 int i;
450 for (i = 0; i < HARD_REG_SET_LONGS; i++)
451 if (x[i] != y[i])
452 return false;
453 return true;
456 static inline bool
457 hard_reg_set_intersect_p (const HARD_REG_SET x, const HARD_REG_SET y)
459 int i;
461 for (i = 0; i < HARD_REG_SET_LONGS; i++)
462 if ((x[i] & y[i]) != 0)
463 return true;
464 return false;
467 static inline bool
468 hard_reg_set_empty_p (const HARD_REG_SET x)
470 int i;
472 for (i = 0; i < HARD_REG_SET_LONGS; i++)
473 if (x[i] != 0)
474 return false;
475 return true;
478 #endif
479 #endif
480 #endif
481 #endif
483 /* Define some standard sets of registers. */
485 /* Indexed by hard register number, contains 1 for registers
486 that are fixed use (stack pointer, pc, frame pointer, etc.).
487 These are the registers that cannot be used to allocate
488 a pseudo reg whose life does not cross calls. */
490 extern char fixed_regs[FIRST_PSEUDO_REGISTER];
492 /* The same info as a HARD_REG_SET. */
494 extern HARD_REG_SET fixed_reg_set;
496 /* Indexed by hard register number, contains 1 for registers
497 that are fixed use or are clobbered by function calls.
498 These are the registers that cannot be used to allocate
499 a pseudo reg whose life crosses calls. */
501 extern char call_used_regs[FIRST_PSEUDO_REGISTER];
503 #ifdef CALL_REALLY_USED_REGISTERS
504 extern char call_really_used_regs[];
505 #endif
507 /* The same info as a HARD_REG_SET. */
509 extern HARD_REG_SET call_used_reg_set;
511 /* Registers that we don't want to caller save. */
512 extern HARD_REG_SET losing_caller_save_reg_set;
514 /* Indexed by hard register number, contains 1 for registers that are
515 fixed use -- i.e. in fixed_regs -- or a function value return register
516 or TARGET_STRUCT_VALUE_RTX or STATIC_CHAIN_REGNUM. These are the
517 registers that cannot hold quantities across calls even if we are
518 willing to save and restore them. */
520 extern char call_fixed_regs[FIRST_PSEUDO_REGISTER];
522 /* The same info as a HARD_REG_SET. */
524 extern HARD_REG_SET call_fixed_reg_set;
526 /* Indexed by hard register number, contains 1 for registers
527 that are being used for global register decls.
528 These must be exempt from ordinary flow analysis
529 and are also considered fixed. */
531 extern char global_regs[FIRST_PSEUDO_REGISTER];
533 /* Contains 1 for registers that are set or clobbered by calls. */
534 /* ??? Ideally, this would be just call_used_regs plus global_regs, but
535 for someone's bright idea to have call_used_regs strictly include
536 fixed_regs. Which leaves us guessing as to the set of fixed_regs
537 that are actually preserved. We know for sure that those associated
538 with the local stack frame are safe, but scant others. */
540 extern HARD_REG_SET regs_invalidated_by_call;
542 #ifdef REG_ALLOC_ORDER
543 /* Table of register numbers in the order in which to try to use them. */
545 extern int reg_alloc_order[FIRST_PSEUDO_REGISTER];
547 /* The inverse of reg_alloc_order. */
549 extern int inv_reg_alloc_order[FIRST_PSEUDO_REGISTER];
550 #endif
552 /* For each reg class, a HARD_REG_SET saying which registers are in it. */
554 extern HARD_REG_SET reg_class_contents[N_REG_CLASSES];
556 /* For each reg class, number of regs it contains. */
558 extern unsigned int reg_class_size[N_REG_CLASSES];
560 /* For each pair of reg classes,
561 a largest reg class contained in their union. */
563 extern enum reg_class reg_class_subunion[N_REG_CLASSES][N_REG_CLASSES];
565 /* For each pair of reg classes,
566 the smallest reg class that contains their union. */
568 extern enum reg_class reg_class_superunion[N_REG_CLASSES][N_REG_CLASSES];
570 /* Vector indexed by hardware reg giving its name. */
572 extern const char * reg_names[FIRST_PSEUDO_REGISTER];
574 /* Vector indexed by reg class giving its name. */
576 extern const char * reg_class_names[];
578 /* Given a hard REGN a FROM mode and a TO mode, return nonzero if
579 REGN cannot change modes between the specified modes. */
580 #define REG_CANNOT_CHANGE_MODE_P(REGN, FROM, TO) \
581 CANNOT_CHANGE_MODE_CLASS (FROM, TO, REGNO_REG_CLASS (REGN))
583 #endif /* ! GCC_HARD_REG_SET_H */