mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
target/i386: use compiler builtin to compute PF
This removes the 256 byte parity table from the executable. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
46c04e4bcf
commit
24899cdcd2
5 changed files with 26 additions and 48 deletions
|
@ -313,6 +313,15 @@ static inline int ctpop8(uint8_t val)
|
|||
return __builtin_popcount(val);
|
||||
}
|
||||
|
||||
/*
|
||||
* parity8 - return the parity (1 = odd) of an 8-bit value.
|
||||
* @val: The value to search
|
||||
*/
|
||||
static inline int parity8(uint8_t val)
|
||||
{
|
||||
return __builtin_parity(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* ctpop16 - count the population of one bits in a 16-bit value.
|
||||
* @val: The value to search
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue