2 struct bitmap_head_def;
3 typedef struct bitmap_head_def *bitmap;
4 typedef const struct bitmap_head_def *const_bitmap;
5 typedef unsigned long BITMAP_WORD;
6 typedef struct bitmap_obstack
8 struct bitmap_element_def *elements;
9 struct bitmap_head_def *heads;
10 struct obstack obstack;
12 typedef struct bitmap_element_def
14 struct bitmap_element_def *next;
15 struct bitmap_element_def *prev;
17 BITMAP_WORD bits[((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u))];
20 struct bitmap_descriptor;
22 typedef struct bitmap_head_def {
23 bitmap_element *first;
24 bitmap_element *current;
26 bitmap_obstack *obstack;
29 bitmap_element bitmap_zero_bits;
39 static void __attribute__((noinline))
40 bmp_iter_set_init (bitmap_iterator *bi, const_bitmap map,
41 unsigned start_bit, unsigned *bit_no)
43 bi->elt1 = map->first;
44 bi->elt2 = ((void *)0);
50 bi->elt1 = &bitmap_zero_bits;
54 if (bi->elt1->indx >= start_bit / (((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u)) * (8 * 8 * 1u)))
56 bi->elt1 = bi->elt1->next;
59 if (bi->elt1->indx != start_bit / (((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u)) * (8 * 8 * 1u)))
60 start_bit = bi->elt1->indx * (((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u)) * (8 * 8 * 1u));
62 bi->word_no = start_bit / (8 * 8 * 1u) % ((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u));
63 bi->bits = bi->elt1->bits[bi->word_no];
64 bi->bits >>= start_bit % (8 * 8 * 1u);
66 start_bit += !bi->bits;
71 static void __attribute__((noinline))
72 bmp_iter_next (bitmap_iterator *bi, unsigned *bit_no)
78 static unsigned char __attribute__((noinline))
79 bmp_iter_set_tail (bitmap_iterator *bi, unsigned *bit_no)
81 while (!(bi->bits & 1))
89 static __inline__ unsigned char
90 bmp_iter_set (bitmap_iterator *bi, unsigned *bit_no)
92 unsigned bno = *bit_no;
93 BITMAP_WORD bits = bi->bits;
107 *bit_no = ((bno + 64 - 1) / 64 * 64);
113 while (bi->word_no != 2)
115 bi->bits = elt1->bits[bi->word_no];
119 return bmp_iter_set_tail (bi, bit_no);
131 *bit_no = elt1->indx * (2 * 64);
136 extern void abort (void);
138 static void __attribute__((noinline)) catchme(int i)
140 if (i != 0 && i != 64)
143 static void __attribute__((noinline)) foobar (bitmap_head *chain)
147 for (bmp_iter_set_init (&(rsi), (chain), (0), &(regno));
148 bmp_iter_set (&(rsi), &(regno));
149 bmp_iter_next (&(rsi), &(regno)))
155 bitmap_element elem = { (void *)0, (void *)0, 0, { 1, 1 } };
156 bitmap_head live_throughout = { &elem, &elem, 0, (void *)0 };
157 foobar (&live_throughout);