From patchwork Sat Nov 24 23:55:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emilio Cota X-Patchwork-Id: 10696621 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B79D13AD for ; Sat, 24 Nov 2018 23:57:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF284299D9 for ; Sat, 24 Nov 2018 23:57:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DEB7329ADA; Sat, 24 Nov 2018 23:57:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6FA8D299D9 for ; Sat, 24 Nov 2018 23:57:47 +0000 (UTC) Received: from localhost ([::1]:58146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQho2-0004Qf-3k for patchwork-qemu-devel@patchwork.kernel.org; Sat, 24 Nov 2018 18:57:46 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQhmV-0003G1-Sp for qemu-devel@nongnu.org; Sat, 24 Nov 2018 18:56:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gQhmQ-0005Dz-Oq for qemu-devel@nongnu.org; Sat, 24 Nov 2018 18:56:11 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:58263) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gQhmO-0004eC-8P for qemu-devel@nongnu.org; Sat, 24 Nov 2018 18:56:05 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 046D9C7D; Sat, 24 Nov 2018 18:56:00 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sat, 24 Nov 2018 18:56:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h= from:to:cc:subject:date:message-id; s=mesmtp; bh=S3u/m3U1wOO6ItH q5W+kx8X7qQWK5Os8/AJI4GJKE1U=; b=dpMMN9/FmEHunoJmsFYUmuRSzFaRqrd pYzJ4FDdVP7ObIO9TcndaOhZ99ZzyjjMAWCoEjJJDyLrMRunxnZ9vwUTwPQdGdFq YfJGVzUtt0s+cYYKdrOYLa72F+D0Q96sa8FqMSfC6UHoWKsCpEyJyd8atSKp6m7Z VlpV4DxOkzOU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:message-id:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=S3u/m3U1wOO6ItHq5W+kx8X7qQWK5Os8/AJI4GJKE1U=; b=VW8Yl86w n1RhlIfJnjVr7/8zPjnTrIMbLgYX2K10bkoNHk3El+mXwuV9WJQCfgwxPr4BwIQN EMAOzzL6nvyo/Yi3IK+VNe7Hv/SvfkJZOkbXIidaq+cE2y87S/+WuU0u2Cw/Nge6 y0wjx+ltrveW5OW5VG7Yxj6VR9ZqtJzpH4zneGztGWCrE775hCwQHloWz3Kwhtvc mjm8PbVUsu7lBdbwvLZWJ99eeveLigdgjdk7XnSQ31J4P+rzOnKqzqiT23KoAfhd lSQJtvnIt9q4HwPHkkxltPFOxsfgUtO4B4YDgJX90e1e9PbaMeJbJro6tUp2nX3B DrxzPLYwRP/CrA== X-ME-Sender: X-ME-Proxy: Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id B51F2E47C4; Sat, 24 Nov 2018 18:55:59 -0500 (EST) From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Sat, 24 Nov 2018 18:55:40 -0500 Message-Id: <20181124235553.17371-1-cota@braap.org> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.147.123.25 Subject: [Qemu-devel] [PATCH v6 00/13] hardfloat X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP v5: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02793.html Changes since v5: - Rebase on rth/tcg-next-for-4.0 - Use QEMU_FLATTEN instead of __attribute__((flatten)) - Merge rth's cleanups (thanks!). With this, we now use a union to hold {float|float32} or {double|float64} types, which gets rid of most macros. I added a few optimizations (i.e. likely hints in some branches, and not using temp variables to hold the result of fpclassify) to roughly match (and sometimes surpass) v5's performance. - float64_sqrt: use fpclassify, which gives a 1.5x speedup. This series introduces no regressions to fp-test. You can test hardfloat by passing "-f x" to fp-test (so that the inexact flag is set before each operation) and using even rounding (fp-test's default). Note that hardfloat does not affect operations with other rounding modes. Perf numbers for fp-bench running on several host machines are in each commit log; numbers for several benchmarks (NBench, SPEC06fp) are in the last patch's commit log. These numbers are a bit outdated (they're from v2 or so), but I've decided to keep them because they give a good idea of the speedups to expect, and I don't have time to re-run them =) I did re-run the numbers for sqrt and cmp, though, since the implementation has changed quite a bit since v5. I didn't re-run these on Aarch64 and PPC hosts due to lack of time, but I doubt they'd change significantly. You can fetch this series from: https://github.com/cota/qemu/tree/hardfloat-v6 Thanks, Emilio