Blame SOURCES/ck-register-constraint.patch

58f2cc
commit b02bb2b805c970e6ef90e8e15daafa5d78cb195f
58f2cc
Author: Paul Khuong <pvk@google.com>
58f2cc
Date:   Wed Aug 21 10:08:10 2019 -0400
58f2cc
58f2cc
    x86/ck_pr: fix register constraint for ck_pr_foo_is_zero
58f2cc
    
58f2cc
    setcc works with byte registers, so we want `q` to ensure
58f2cc
    the low byte register is encodable, not the general `r`.
58f2cc
    
58f2cc
    Fixes https://github.com/concurrencykit/ck/issues/142.
58f2cc
58f2cc
diff --git a/include/gcc/x86/ck_pr.h b/include/gcc/x86/ck_pr.h
58f2cc
index e678e83..8ef8864 100644
58f2cc
--- a/include/gcc/x86/ck_pr.h
58f2cc
+++ b/include/gcc/x86/ck_pr.h
58f2cc
@@ -239,7 +239,7 @@ CK_PR_FAA_S(8,  uint8_t,  "xaddb")
58f2cc
 		bool ret;						\
58f2cc
 		__asm__ __volatile__(CK_PR_LOCK_PREFIX I " %0; setz %1"	\
58f2cc
 					: "+m" (*(C *)target),		\
58f2cc
-					  "=rm" (ret)			\
58f2cc
+					  "=qm" (ret)			\
58f2cc
 					:				\
58f2cc
 					: "memory", "cc");		\
58f2cc
 		return ret;						\
58f2cc
@@ -354,7 +354,7 @@ CK_PR_CAS_S(8,  uint8_t,  "cmpxchgb")
58f2cc
 					: "q"   (set),				\
58f2cc
 					  "a"   (compare)			\
58f2cc
 					: "memory", "cc");			\
58f2cc
-		return (bool)z;							\
58f2cc
+		return z;							\
58f2cc
 	}
58f2cc
 
58f2cc
 CK_PR_CAS_O(ptr, void, void *, char, "l", "eax")