/[avr-libc]/avr-libc/include/avr/parity.h
ViewVC logotype

Diff of /avr-libc/include/avr/parity.h

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

revision 1.3.2.1 by joerg_wunsch, Fri Dec 31 15:50:18 2004 UTC revision 1.3.2.2 by joerg_wunsch, Thu Sep 8 21:19:34 2005 UTC
# Line 45  Line 45 
45  /** \def parity_even_bit  /** \def parity_even_bit
46      \ingroup avr_parity      \ingroup avr_parity
47      \returns 1 if \c val has an odd number of bits set. */      \returns 1 if \c val has an odd number of bits set. */
48  #define parity_even_bit(val) ({                         \  #define parity_even_bit(val)                            \
49    (__extension__({                                        \
50          unsigned char __t;                              \          unsigned char __t;                              \
51          __asm__ (                                       \          __asm__ (                                       \
52                  "mov __tmp_reg__,%0" "\n\t"             \                  "mov __tmp_reg__,%0" "\n\t"             \
# Line 60  Line 61 
61                  : "r0"                                  \                  : "r0"                                  \
62          );                                              \          );                                              \
63          (((__t + 1) >> 1) & 1);                         \          (((__t + 1) >> 1) & 1);                         \
64   })   }))
65    
66  #endif /* _AVR_PARITY_H_ */  #endif /* _AVR_PARITY_H_ */

Legend:
Removed from v.1.3.2.1  
changed lines
  Added in v.1.3.2.2

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