/[smarc]/smarc/src/vmachine/bit_word.h
ViewVC logotype

Diff of /smarc/src/vmachine/bit_word.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by misto, Sat Dec 28 16:28:11 2002 UTC revision 1.4 by misto, Sun Dec 29 23:45:23 2002 UTC
# Line 44  class bit_word { Line 44  class bit_word {
44                  void bset( int n ) {                  void bset( int n ) {
45                          raw |= (1UL << n);                          raw |= (1UL << n);
46                  }                  }
47                    void bset( int n, int m ) {
48                            raw |= (~0 << n) & ((1UL << (m+1)) - 1);
49                    }
50                  void bunset( int n ) {                  void bunset( int n ) {
51                          raw &= ~(1UL << n);                          raw &= ~(1UL << n);
52                  }                  }
53                    void bunset( int n, int m ) {
54                            raw &= ~((~0 << n) & ((1UL << (m+1)) - 1));
55                    }
56                                    
57          friend bit_word operator+( bit_word a, bit_word b);          friend bit_word operator+( bit_word a, bit_word b);
58          friend bit_word operator-( bit_word a, bit_word b);          friend bit_word operator-( bit_word a, bit_word b);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26