doxygen comments added
[libfirm] / ir / st / bs.h
1 /* Copyright (c) 2002 by Universität Karlsruhe (TH).  All Rights Reserved */
2
3 /*
4    NAME
5      bs
6    PURPOSE
7      provide bs_t
8    S
9      not quite complete
10    HISTORY
11      liekweg - Feb 27, 2002: Created.
12    CVS:
13      $Id$
14  */
15
16 # ifndef _BS_H_
17 # define _BS_H_
18
19 /**
20  * the type of a bit set
21  */
22 typedef long int bs_t;
23
24 /** set bit in a bit set */
25 # define bs_set(bs, i) (bs) |= (0x00000001 << i)
26
27 /** get bit in a bit set */
28 # define bs_get(bs, i) (bs) &  (0x00000001 << i)
29
30 /** logical AND of two bit sets */
31 # define bs_and(bsa, bsb) (bsa) &= (bsb)
32
33 /** logical OR of two bit sets */
34 # define bs_or(bsa, bsb)  (bsa) |= (bsb)
35
36 /** logical XOR of two bit sets */
37 # define bs_xor(bsa, bsb) (bsa) ^= (bsb)
38
39 /** returns TRUE if at least one bit is set */
40 # define bs_zro(bs) (0x00000000 != bs)
41
42 # endif /* ndef _BS_H_ */