comparison gcc/hard-reg-set.h @ 55:77e2b8dfacca gcc-4.4.5

update it from 4.4.3 to 4.5.0
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Fri, 12 Feb 2010 23:39:51 +0900
parents a06113de4d67
children f6334be47118
comparison
equal deleted inserted replaced
52:c156f1bd5cd9 55:77e2b8dfacca
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see 18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */ 19 <http://www.gnu.org/licenses/>. */
20 20
21 #ifndef GCC_HARD_REG_SET_H 21 #ifndef GCC_HARD_REG_SET_H
22 #define GCC_HARD_REG_SET_H 22 #define GCC_HARD_REG_SET_H
23 23
24 /* Define the type of a set of hard registers. */ 24 /* Define the type of a set of hard registers. */
25 25
26 /* HARD_REG_ELT_TYPE is a typedef of the unsigned integral type which 26 /* HARD_REG_ELT_TYPE is a typedef of the unsigned integral type which
27 will be used for hard reg sets, either alone or in an array. 27 will be used for hard reg sets, either alone or in an array.
498 HARD_REG_ELT_TYPE bits; 498 HARD_REG_ELT_TYPE bits;
499 } hard_reg_set_iterator; 499 } hard_reg_set_iterator;
500 500
501 #define HARD_REG_ELT_BITS UHOST_BITS_PER_WIDE_INT 501 #define HARD_REG_ELT_BITS UHOST_BITS_PER_WIDE_INT
502 502
503 /* The implementation of the iterator functions is fully analogous to 503 /* The implementation of the iterator functions is fully analogous to
504 the bitmap iterators. */ 504 the bitmap iterators. */
505 static inline void 505 static inline void
506 hard_reg_set_iter_init (hard_reg_set_iterator *iter, HARD_REG_SET set, 506 hard_reg_set_iter_init (hard_reg_set_iterator *iter, HARD_REG_SET set,
507 unsigned min, unsigned *regno) 507 unsigned min, unsigned *regno)
508 { 508 {
509 #ifdef HARD_REG_SET_LONGS 509 #ifdef HARD_REG_SET_LONGS
510 iter->pelt = set; 510 iter->pelt = set;
511 iter->length = HARD_REG_SET_LONGS; 511 iter->length = HARD_REG_SET_LONGS;
523 min += !iter->bits; 523 min += !iter->bits;
524 } 524 }
525 *regno = min; 525 *regno = min;
526 } 526 }
527 527
528 static inline bool 528 static inline bool
529 hard_reg_set_iter_set (hard_reg_set_iterator *iter, unsigned *regno) 529 hard_reg_set_iter_set (hard_reg_set_iterator *iter, unsigned *regno)
530 { 530 {
531 while (1) 531 while (1)
532 { 532 {
533 /* Return false when we're advanced past the end of the set. */ 533 /* Return false when we're advanced past the end of the set. */
542 iter->bits >>= 1; 542 iter->bits >>= 1;
543 *regno += 1; 543 *regno += 1;
544 } 544 }
545 return (*regno < FIRST_PSEUDO_REGISTER); 545 return (*regno < FIRST_PSEUDO_REGISTER);
546 } 546 }
547 547
548 /* Round to the beginning of the next word. */ 548 /* Round to the beginning of the next word. */
549 *regno = (*regno + HARD_REG_ELT_BITS - 1); 549 *regno = (*regno + HARD_REG_ELT_BITS - 1);
550 *regno -= *regno % HARD_REG_ELT_BITS; 550 *regno -= *regno % HARD_REG_ELT_BITS;
551 551
552 /* Find the next non-zero word. */ 552 /* Find the next non-zero word. */
598 #endif 598 #endif
599 599
600 /* The same info as a HARD_REG_SET. */ 600 /* The same info as a HARD_REG_SET. */
601 601
602 extern HARD_REG_SET call_used_reg_set; 602 extern HARD_REG_SET call_used_reg_set;
603 603
604 /* Indexed by hard register number, contains 1 for registers that are 604 /* Contains registers that are fixed use -- i.e. in fixed_reg_set -- or
605 fixed use -- i.e. in fixed_regs -- or a function value return register 605 a function value return register or TARGET_STRUCT_VALUE_RTX or
606 or TARGET_STRUCT_VALUE_RTX or STATIC_CHAIN_REGNUM. These are the 606 STATIC_CHAIN_REGNUM. These are the registers that cannot hold quantities
607 registers that cannot hold quantities across calls even if we are 607 across calls even if we are willing to save and restore them. */
608 willing to save and restore them. */
609
610 extern char call_fixed_regs[FIRST_PSEUDO_REGISTER];
611
612 /* The same info as a HARD_REG_SET. */
613 608
614 extern HARD_REG_SET call_fixed_reg_set; 609 extern HARD_REG_SET call_fixed_reg_set;
615 610
616 /* Indexed by hard register number, contains 1 for registers 611 /* Indexed by hard register number, contains 1 for registers
617 that are being used for global register decls. 612 that are being used for global register decls.