From owner-p4-projects@FreeBSD.ORG Mon Mar 7 20:48:24 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1901316A4D0; Mon, 7 Mar 2005 20:48:24 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF5A516A4CE for ; Mon, 7 Mar 2005 20:48:23 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 979F943D3F for ; Mon, 7 Mar 2005 20:48:23 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j27KmN30023129 for ; Mon, 7 Mar 2005 20:48:23 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j27KmNlE023126 for perforce@freebsd.org; Mon, 7 Mar 2005 20:48:23 GMT (envelope-from jhb@freebsd.org) Date: Mon, 7 Mar 2005 20:48:23 GMT Message-Id: <200503072048.j27KmNlE023126@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 72657 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2005 20:48:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=72657 Change 72657 by jhb@jhb_slimer on 2005/03/07 20:47:43 Only clobber memory for acq variants. Note that variants with no membar at all map to acq on ia64, so only explicit rel variants lose the clobber with this change. Affected files ... .. //depot/projects/smpng/sys/ia64/include/atomic.h#4 edit Differences ... ==== //depot/projects/smpng/sys/ia64/include/atomic.h#4 (text+ko) ==== @@ -37,13 +37,13 @@ /* * Everything is built out of cmpxchg. */ -#define IA64_CMPXCHG(sz, sem, p, cmpval, newval, ret) \ +#define IA64_CMPXCHG(sz, sem, p, cmpval, newval, ret, clobber) \ __asm __volatile ( \ "mov ar.ccv=%2;;\n\t" \ "cmpxchg" #sz "." #sem " %0=%4,%3,ar.ccv\n\t" \ : "=r" (ret), "=m" (*p) \ : "r" (cmpval), "r" (newval), "m" (*p) \ - : "memory") + : clobber) /* * Some common forms of cmpxch. @@ -52,7 +52,7 @@ ia64_cmpxchg_acq_32(volatile uint32_t* p, uint32_t cmpval, uint32_t newval) { uint32_t ret; - IA64_CMPXCHG(4, acq, p, cmpval, newval, ret); + IA64_CMPXCHG(4, acq, p, cmpval, newval, ret, "memory"); return (ret); } @@ -60,7 +60,7 @@ ia64_cmpxchg_rel_32(volatile uint32_t* p, uint32_t cmpval, uint32_t newval) { uint32_t ret; - IA64_CMPXCHG(4, rel, p, cmpval, newval, ret); + IA64_CMPXCHG(4, rel, p, cmpval, newval, ret, ""); return (ret); } @@ -68,7 +68,7 @@ ia64_cmpxchg_acq_64(volatile uint64_t* p, uint64_t cmpval, uint64_t newval) { uint64_t ret; - IA64_CMPXCHG(8, acq, p, cmpval, newval, ret); + IA64_CMPXCHG(8, acq, p, cmpval, newval, ret, "memory"); return (ret); } @@ -76,7 +76,7 @@ ia64_cmpxchg_rel_64(volatile uint64_t* p, uint64_t cmpval, uint64_t newval) { uint64_t ret; - IA64_CMPXCHG(8, rel, p, cmpval, newval, ret); + IA64_CMPXCHG(8, rel, p, cmpval, newval, ret, ""); return (ret); } @@ -112,7 +112,7 @@ ia64_st_rel_##width(volatile uint##width##_t* p, uint##width##_t v) \ { \ __asm __volatile ("st" size ".rel %0=%1" : "=m" (*p) \ - : "r" (v) : "memory"); \ + : "r" (v)); \ } \ \ static __inline void \ @@ -120,7 +120,7 @@ uint##width##_t v) \ { \ __asm __volatile ("st" size ".rel %0=%1" : "=m" (*p) \ - : "r" (v) : "memory"); \ + : "r" (v)); \ } \ \ static __inline void \ @@ -128,7 +128,7 @@ uint##width##_t v) \ { \ __asm __volatile ("st" size ".rel %0=%1" : "=m" (*p) \ - : "r" (v) : "memory"); \ + : "r" (v)); \ } ATOMIC_STORE_LOAD(char, 8, "1") @@ -145,7 +145,7 @@ type old, ret; \ do { \ old = *p; \ - IA64_CMPXCHG(sz, acq, p, old, old op v, ret); \ + IA64_CMPXCHG(sz, acq, p, old, old op v, ret, "memory");\ } while (ret != old); \ return (old); \ } \ @@ -156,7 +156,7 @@ type old, ret; \ do { \ old = *p; \ - IA64_CMPXCHG(sz, rel, p, old, old op v, ret); \ + IA64_CMPXCHG(sz, rel, p, old, old op v, ret, "");\ } while (ret != old); \ return (old); \ }