projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9eea3b
)
Bugfix in mask highest.
author
Daniel Grund
<grund@cs.uni-saarland.de>
Wed, 10 Aug 2005 13:06:23 +0000
(13:06 +0000)
committer
Daniel Grund
<grund@cs.uni-saarland.de>
Wed, 10 Aug 2005 13:06:23 +0000
(13:06 +0000)
[r6387]
ir/adt/bitset.h
patch
|
blob
|
history
diff --git
a/ir/adt/bitset.h
b/ir/adt/bitset.h
index
4f249be
..
d16d449
100644
(file)
--- a/
ir/adt/bitset.h
+++ b/
ir/adt/bitset.h
@@
-73,8
+73,10
@@
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] &= (1 << (bs->size & BS_UNIT_MASK)) - 1;
- return bs;
+ bitset_pos_t rest = bs->size & BS_UNIT_MASK;
+ if (rest)
+ bs->data[bs->units - 1] &= (1 << rest) - 1;
+ return bs;
}
/**