Rechercher une page de manuel
util_parity
Langue: en
Version: 278158 (debian - 07/07/09)
Section: 3 (Bibliothèques de fonctions)
NAME
<util/parity.h>: Parity bit generation -Detailed Description
#include <util/parity.h>
This header file contains optimized assembler code to calculate the parity bit for a byte.
Defines
#define parity_even_bit(val)
Define Documentation
#define parity_even_bit(val)
Value:
(__extension__({ unsigned char __t; __asm__ ( 'mov __tmp_reg__,%0' 't' 'swap %0' 't' 'eor %0,__tmp_reg__' 't' 'mov __tmp_reg__,%0' 't' 'lsr %0' 't' 'lsr %0' 't' 'eor %0,__tmp_reg__' : '=r' (__t) : '0' ((unsigned char)(val)) : 'r0' ); (((__t + 1) >> 1) & 1); }))Returns:
- 1 if val has an odd number of bits set.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre