1 /* Header file the type CGEN_BITSET.
2 Copyright 2002, 2005, 2009 Free Software Foundation, Inc.
4 This file is part of the GNU opcodes library.
6 This library is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 It is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this library; see the file COPYING3. If not, write to the
18 Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
28 /* A bitmask represented as a string.
29 Each member of the set is represented as a bit
30 in the string. Bytes are indexed from left to right in the string and
31 bits from most significant to least within each byte.
33 For example, the bit representing member number 6 is (set->bits[0] & 0x02).
35 typedef struct cgen_bitset
41 extern CGEN_BITSET *cgen_bitset_create PARAMS ((unsigned));
42 extern void cgen_bitset_init PARAMS ((CGEN_BITSET *, unsigned));
43 extern void cgen_bitset_clear PARAMS ((CGEN_BITSET *));
44 extern void cgen_bitset_add PARAMS ((CGEN_BITSET *, unsigned));
45 extern void cgen_bitset_set PARAMS ((CGEN_BITSET *, unsigned));
46 extern int cgen_bitset_compare PARAMS ((CGEN_BITSET *, CGEN_BITSET *));
47 extern void cgen_bitset_union PARAMS ((CGEN_BITSET *, CGEN_BITSET *, CGEN_BITSET *));
48 extern int cgen_bitset_intersect_p PARAMS ((CGEN_BITSET *, CGEN_BITSET *));
49 extern int cgen_bitset_contains PARAMS ((CGEN_BITSET *, unsigned));
50 extern CGEN_BITSET *cgen_bitset_copy PARAMS ((CGEN_BITSET *));