From owner-svn-src-head@freebsd.org Mon Jan 30 02:52:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 601E0CC75B6; Mon, 30 Jan 2017 02:52:17 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 083281C3E; Mon, 30 Jan 2017 02:52:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0U2qGOL022478; Mon, 30 Jan 2017 02:52:16 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0U2qGcO022477; Mon, 30 Jan 2017 02:52:16 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201701300252.v0U2qGcO022477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 30 Jan 2017 02:52:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312978 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 02:52:17 -0000 Author: jhibbits Date: Mon Jan 30 02:52:15 2017 New Revision: 312978 URL: https://svnweb.freebsd.org/changeset/base/312978 Log: Drop the __GNUCLIKE_ASM guards around most atomic inlines. There are no alternatives defined, so there's no point in keeping them. Also, they weren't around every inline asm block anyway. Without __GNUCLIKE_ASM defined, the guarded functions return garbage. Reported by: Andrew Thompson Modified: head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Mon Jan 30 02:32:33 2017 (r312977) +++ head/sys/powerpc/include/atomic.h Mon Jan 30 02:52:15 2017 (r312978) @@ -446,7 +446,6 @@ atomic_readandclear_int(volatile u_int * { u_int result,temp; -#ifdef __GNUCLIKE_ASM __asm __volatile ( "\tsync\n" /* drain writes */ "1:\tlwarx %0, 0, %3\n\t" /* load old value */ @@ -456,7 +455,6 @@ atomic_readandclear_int(volatile u_int * : "=&r"(result), "=&r"(temp), "=m" (*addr) : "r" (addr), "m" (*addr) : "cr0", "memory"); -#endif return (result); } @@ -467,7 +465,6 @@ atomic_readandclear_long(volatile u_long { u_long result,temp; -#ifdef __GNUCLIKE_ASM __asm __volatile ( "\tsync\n" /* drain writes */ "1:\tldarx %0, 0, %3\n\t" /* load old value */ @@ -477,7 +474,6 @@ atomic_readandclear_long(volatile u_long : "=&r"(result), "=&r"(temp), "=m" (*addr) : "r" (addr), "m" (*addr) : "cr0", "memory"); -#endif return (result); } @@ -565,7 +561,6 @@ atomic_cmpset_int(volatile u_int* p, u_i { int ret; -#ifdef __GNUCLIKE_ASM __asm __volatile ( "1:\tlwarx %0, 0, %2\n\t" /* load old value */ "cmplw %3, %0\n\t" /* compare */ @@ -581,7 +576,6 @@ atomic_cmpset_int(volatile u_int* p, u_i : "=&r" (ret), "=m" (*p) : "r" (p), "r" (cmpval), "r" (newval), "m" (*p) : "cr0", "memory"); -#endif return (ret); } @@ -590,7 +584,6 @@ atomic_cmpset_long(volatile u_long* p, u { int ret; -#ifdef __GNUCLIKE_ASM __asm __volatile ( #ifdef __powerpc64__ "1:\tldarx %0, 0, %2\n\t" /* load old value */ @@ -617,7 +610,6 @@ atomic_cmpset_long(volatile u_long* p, u : "=&r" (ret), "=m" (*p) : "r" (p), "r" (cmpval), "r" (newval), "m" (*p) : "cr0", "memory"); -#endif return (ret); } @@ -685,7 +677,6 @@ atomic_fcmpset_int(volatile u_int *p, u_ { int ret; -#ifdef __GNUCLIKE_ASM __asm __volatile ( "1:\tlwarx %0, 0, %3\n\t" /* load old value */ "cmplw %4, %0\n\t" /* compare */ @@ -702,7 +693,6 @@ atomic_fcmpset_int(volatile u_int *p, u_ : "=&r" (ret), "=m" (*p), "=m" (*cmpval) : "r" (p), "r" (*cmpval), "r" (newval), "m" (*p), "r"(cmpval) : "cr0", "memory"); -#endif return (ret); } @@ -711,7 +701,6 @@ atomic_fcmpset_long(volatile u_long *p, { int ret; -#ifdef __GNUCLIKE_ASM __asm __volatile ( #ifdef __powerpc64__ "1:\tldarx %0, 0, %3\n\t" /* load old value */ @@ -740,7 +729,6 @@ atomic_fcmpset_long(volatile u_long *p, : "=&r" (ret), "=m" (*p), "=m" (*cmpval) : "r" (p), "r" (*cmpval), "r" (newval), "m" (*p), "r"(cmpval) : "cr0", "memory"); -#endif return (ret); }