projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee70dc5
)
Fixed a bug in bitset_mask_highest and bitset_set_all
author
Sebastian Hack
<hack@ipd.info.uni-karlsruhe.de>
Wed, 20 Jul 2005 10:01:19 +0000
(10:01 +0000)
committer
Sebastian Hack
<hack@ipd.info.uni-karlsruhe.de>
Wed, 20 Jul 2005 10:01:19 +0000
(10:01 +0000)
[r6250]
ir/adt/bitset.h
patch
|
blob
|
history
diff --git
a/ir/adt/bitset.h
b/ir/adt/bitset.h
index
c622ef8
..
4f249be
100644
(file)
--- a/
ir/adt/bitset.h
+++ b/
ir/adt/bitset.h
@@
-73,7
+73,7
@@
static INLINE bitset_t *_bitset_prepare(void *area, bitset_pos_t size)
*/
static INLINE bitset_t *_bitset_mask_highest(bitset_t *bs)
{
- bs->data[bs->units - 1] &= (
bs->size & BS_UNIT_MASK
) - 1;
+ bs->data[bs->units - 1] &= (
1 << (bs->size & BS_UNIT_MASK)
) - 1;
return bs;
}
@@
-345,8
+345,8
@@
static INLINE bitset_t *bitset_clear_all(bitset_t *bs)
*/
static INLINE bitset_t *bitset_set_all(bitset_t *bs)
{
- memset(bs->data, -1,
BS_UNIT_SIZE * bs->units
);
- return
bs
;
+ memset(bs->data, -1,
bs->units * BS_UNIT_SIZE
);
+ return
_bitset_mask_highest(bs)
;
}
/**