From b351374ca8930af7144a08ffdf1b52af010f5188 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 16 Jan 2016 23:05:21 +0100 Subject: [PATCH] CHG: Reversed @piwi 's changes to parity. I'm getting assembler compiler errors. --- common/parity.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/common/parity.h b/common/parity.h index 89491646..79b8221d 100644 --- a/common/parity.h +++ b/common/parity.h @@ -13,20 +13,17 @@ extern const uint8_t OddByteParity[256]; -#define oddparity8(x) (OddByteParity[(x)]) +static inline uint8_t oddparity8(uint8_t bt) +{ + return OddByteParity[bt]; +} extern const uint8_t EvenByteParity[256]; -static inline bool /*__attribute__((always_inline))*/ evenparity8(const uint8_t x) { -#if !defined __i386__ || !defined __GNUC__ - return EvenByteParity[x]; -#else - uint8_t y; - __asm( "testb $255, %1\n" - "setpo %0\n" : "=r"(y) : "r"(x): ); - return y; -#endif +static inline uint8_t evenparity8(const uint8_t bt) +{ + return EvenByteParity[bt]; } -- 2.39.2