From patchwork Wed Apr 15 12:23:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco X-Patchwork-Id: 461505 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D829214010F for ; Wed, 15 Apr 2015 22:24:07 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=sourceware.org header.i=@sourceware.org header.b=FauoL5Wa; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=xJi vtfDY6J/l/M89Q88skL+EmTH/cC6oJ6p2QNjbYAMRW3hnsyjPhx9BY/6+2530nI+ VPE5LqyrcmirfJyCzcFOGlKP2tNFjJqI+bLslaS22nTYKq/ic76TP/6DlYOObKco O7TocxTXxTh83HTg4iSbK80ItS01hPtSGEGIlyzY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=8tnSbd88s SnRdS9b4gR1YbdZhUY=; b=FauoL5Wab98B9UG4EtETLuwgRz2yMmCu6u9cbXZQ2 l2uXasjyXpfxS71q1gv7ruYwyAJArQpi3uEr68j9/klFL6sxSxERVXJDU/oY6nGI zXY/gXT1lhgrcS6IB63QmD8zNy1tvJtwamQyu+IUxLx5/NECzyUiiyi2ThpP4go3 ao= Received: (qmail 58045 invoked by alias); 15 Apr 2015 12:24:00 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 58026 invoked by uid 89); 15 Apr 2015 12:23:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com From: "Wilco Dijkstra" To: Subject: [PATCH][AArch64] Faster math barriers Date: Wed, 15 Apr 2015 13:23:42 +0100 Message-ID: <000201d07777$02ea0890$08be19b0$@com> MIME-Version: 1.0 X-MC-Unique: P9sJn_XqR5mHupVGmqAVfw-1 Add more efficient versions of math_opt_barrier and math_force_eval that avoid going via memory. OK for commit? 2015-04-15 Wilco Dijkstra * sysdeps/aarch64/fpu/math_private.h (define math_opt_barrier): Add AArch64 version. (math_force_eval): Likewise. --- sysdeps/aarch64/fpu/math_private.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/aarch64/fpu/math_private.h b/sysdeps/aarch64/fpu/math_private.h index b3c2509..1f02ddb 100644 --- a/sysdeps/aarch64/fpu/math_private.h +++ b/sysdeps/aarch64/fpu/math_private.h @@ -22,6 +22,11 @@ #include #include +#define math_opt_barrier(x) \ +({ __typeof (x) __x = (x); __asm ("" : "+w" (__x)); __x; }) +#define math_force_eval(x) \ +({ __typeof (x) __x = (x); __asm __volatile__ ("" : : "w" (__x)); }) + extern __always_inline double __ieee754_sqrt (double d) {