Fix previous commit: the RSB refill bits change %rcx so it needed to be
authorguenther <guenther@openbsd.org>
Tue, 24 Jul 2018 14:49:44 +0000 (14:49 +0000)
committerguenther <guenther@openbsd.org>
Tue, 24 Jul 2018 14:49:44 +0000 (14:49 +0000)
given an input/output ASM constraint...but I made it output-only, so the
compiler deleted the initialization.

reported by many, starting with Edd Barrett (edd(at)theunixzoo.co.uk)

sys/arch/amd64/include/cpufunc.h

index 9c6cc12..395250c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cpufunc.h,v 1.28 2018/07/24 02:42:25 guenther Exp $   */
+/*     $OpenBSD: cpufunc.h,v 1.29 2018/07/24 14:49:44 guenther Exp $   */
 /*     $NetBSD: cpufunc.h,v 1.3 2003/05/08 10:27:43 fvdl Exp $ */
 
 /*-
@@ -305,7 +305,7 @@ mwait(u_long extensions, u_int hints)
                "       .align  16,0xcc         ;"
                "7:     loop    3b              ;"
                "       add     $(16*8),%%rsp"
-           : "=c" (extensions) : "a" (hints));
+           : "+c" (extensions) : "a" (hints));
 }
 
 static __inline void