]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - common/parity.h
CHG: Xoring in the value allows for the ticks timers to co-exist. Or that is the...
[proxmark3-svn] / common / parity.h
index 89491646c412438eb30594d71922a73dd8409451..79b8221dc5445293da85141b98a6e2623e6faf92 100644 (file)
 
 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];
 }
 
 
Impressum, Datenschutz