Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2-0]: src/sys/arch/sparc/include Pull up revision 1.18 (requested...



details:   https://anonhg.NetBSD.org/src/rev/4fa8101e297a
branches:  netbsd-2-0
changeset: 564696:4fa8101e297a
user:      tron <tron%NetBSD.org@localhost>
date:      Wed Mar 16 12:38:12 2005 +0000

description:
Pull up revision 1.18 (requested by chs in ticket #1159):
add the early-clobber modifier on the destination reg of ldstub.
in some implementations (eg. sun4c), the hardware modifies the destination
reg before checking for write permission on the memory location.  without
this change, gcc was using the same register for the address and the
destination, so if the store part of the instruction faulted, the address
was already gone when the instruction was retried after resolving the fault.
part of PR 25633, PR 25896.

diffstat:

 sys/arch/sparc/include/lock.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 862cb55b3f8d -r 4fa8101e297a sys/arch/sparc/include/lock.h
--- a/sys/arch/sparc/include/lock.h     Wed Mar 16 12:36:54 2005 +0000
+++ b/sys/arch/sparc/include/lock.h     Wed Mar 16 12:38:12 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lock.h,v 1.14.2.1 2004/04/24 18:32:29 jdc Exp $ */
+/*     $NetBSD: lock.h,v 1.14.2.2 2005/03/16 12:38:12 tron Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
        int v;
 
        __asm __volatile("ldstub [%1],%0"
-           : "=r" (v)
+           : "=&r" (v)
            : "r" (addr)
            : "memory");
 



Home | Main Index | Thread Index | Old Index