gas/
[deliverable/binutils-gdb.git] / include / opcode / cgen-bitset.h
CommitLineData
ea5ca089
DB
1/* Header file the type CGEN_BITSET.
2
3Copyright 2002, 2005 Free Software Foundation, Inc.
4
5This file is part of GDB, the GNU debugger, and the GNU Binutils.
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License along
18with this program; if not, write to the Free Software Foundation, Inc.,
1959 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20#ifndef CGEN_BITSET_H
21#define CGEN_BITSET_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* A bitmask represented as a string.
28 Each member of the set is represented as a bit
29 in the string. Bytes are indexed from left to right in the string and
30 bits from most significant to least within each byte.
31
32 For example, the bit representing member number 6 is (set->bits[0] & 0x02).
33*/
34typedef struct cgen_bitset
35{
36 unsigned length;
37 char *bits;
38} CGEN_BITSET;
39
40extern CGEN_BITSET *cgen_bitset_create PARAMS ((unsigned));
41extern void cgen_bitset_init PARAMS ((CGEN_BITSET *, unsigned));
42extern void cgen_bitset_clear PARAMS ((CGEN_BITSET *));
43extern void cgen_bitset_add PARAMS ((CGEN_BITSET *, unsigned));
44extern void cgen_bitset_set PARAMS ((CGEN_BITSET *, unsigned));
45extern int cgen_bitset_compare PARAMS ((CGEN_BITSET *, CGEN_BITSET *));
46extern void cgen_bitset_union PARAMS ((CGEN_BITSET *, CGEN_BITSET *, CGEN_BITSET *));
47extern int cgen_bitset_intersect_p PARAMS ((CGEN_BITSET *, CGEN_BITSET *));
48extern int cgen_bitset_contains PARAMS ((CGEN_BITSET *, unsigned));
49extern CGEN_BITSET *cgen_bitset_copy PARAMS ((CGEN_BITSET *));
50
51#ifdef __cplusplus
52} // extern "C"
53#endif
54
55#endif
This page took 0.157847 seconds and 4 git commands to generate.