Module Name: src
Committed By: riz
Date: Fri Oct 19 17:33:37 UTC 2012
Modified Files:
src/sys/arch/x86/include [netbsd-6-0]: lock.h
Log Message:
Pull up following revision(s) (requested by apb in ticket #606):
sys/arch/x86/include/lock.h: revision 1.26
Change "=r" to "=qQ" in a register constraint in an asm statement
for a register that is used with the "xchgb" instruction in the
definition of __cpu_simple_lock_try(). This fixes PR 45673, or at
least works around the gcc bug that might be behind PR 45673.
The output from "objdump -d" before and after this change is
identical, for the amd64 GENERIC kernel, the i386 GENERIC kernel,
and the i386 MONOLITHIC kernel.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.25.26.1 src/sys/arch/x86/include/lock.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/include/lock.h
diff -u src/sys/arch/x86/include/lock.h:1.25 src/sys/arch/x86/include/lock.h:1.25.26.1
--- src/sys/arch/x86/include/lock.h:1.25 Thu Jan 15 01:20:31 2009
+++ src/sys/arch/x86/include/lock.h Fri Oct 19 17:33:37 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: lock.h,v 1.25 2009/01/15 01:20:31 pooka Exp $ */
+/* $NetBSD: lock.h,v 1.25.26.1 2012/10/19 17:33:37 riz Exp $ */
/*-
* Copyright (c) 2000, 2006 The NetBSD Foundation, Inc.
@@ -106,7 +106,7 @@ __cpu_simple_lock_try(__cpu_simple_lock_
val = __SIMPLELOCK_LOCKED;
__asm volatile ("xchgb %0,(%2)" :
- "=r" (val)
+ "=qQ" (val)
:"0" (val), "r" (lockp));
__insn_barrier();
return val == __SIMPLELOCK_UNLOCKED;