From patchwork Tue Jul 3 15:17:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 140973 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1291486ljj; Tue, 3 Jul 2018 08:18:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd2T8/KD749JEzAdKKhvpF9Sczsd6be0vB9tKtCcuMn9/RwP3WNnHJKZFN9rVdRjLJ9du57 X-Received: by 2002:a0c:d407:: with SMTP id t7-v6mr26383670qvh.247.1530631112391; Tue, 03 Jul 2018 08:18:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530631112; cv=none; d=google.com; s=arc-20160816; b=AyyUXInjMSxpTPp7g5jHQL9/RJul/OfenMcpWBHOCFbUTign15IgcBnpSDtewWkFAV qwnN6vP7nBcxbH9OOR/KFb3j3d2JACEIu8pl3SDibojgMtvzSIZNcn0a1n3B59xi5BZS vfZu1ygkTEyKzbotDa9daJpeDlwof3h04jKFRdg6WoGiNuLonsXZ1wUf6tOTXXp8NWMo dMcTJwPvlV5fOgkjAtl21hEr/B2vUf2IJLaow9QEJ6/VMgC+fuT6hAIqh2WS7oN5k6Fo pFigIPjK8nUHAGgG1pOZJN7szUQRiCqiIcM43ox88VlUwefhFtBEvZ29QDk60LC5kCUS h2KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=RNBNM1JDs6K7lS4HDXTXrjRU17NMLO7Ug9qn43kvk/Y=; b=Xulj3sNiX9LhRiTglcKG6D1DibrxwX4FA3o6uy/w4G+h8cLr4lKocDBiZ6R8IWoR0W FqnJ1VTqMMwIjlpZpUKHG1U6NmhglJrUojFEtL0bhHQA4OQhsOL9GAEYkaz43JuRALIy uHGWAnpvh2VL6cBaoWHXhetzbZvlCD/HRQWviTlqWbX3Nc8xjl6PtEnGzz3I6KzzqZYg 8k9PvqEem9AqJUoHzAhDpgNmPB27C6YXuvR6PPY6FmA8bV5s73Cbr8fZg6BnRPD2lfjF XRfT14GNnAxfbi/NuGuVcFMdP/SHMcV9d2tMjD40lGMJhRFCfIi1EyGbqrCr4vPx3r+D kwOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ADGmnFVs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id s126-v6si1280538qkb.19.2018.07.03.08.18.32 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 03 Jul 2018 08:18:32 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ADGmnFVs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faN4Z-0006ah-Mm for patch@linaro.org; Tue, 03 Jul 2018 11:18:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faN3k-0006IT-4X for qemu-devel@nongnu.org; Tue, 03 Jul 2018 11:17:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1faN3g-0000LD-6k for qemu-devel@nongnu.org; Tue, 03 Jul 2018 11:17:40 -0400 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:34885) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1faN3g-0000Ki-0d for qemu-devel@nongnu.org; Tue, 03 Jul 2018 11:17:36 -0400 Received: by mail-pf0-x244.google.com with SMTP id q7-v6so75250pff.2 for ; Tue, 03 Jul 2018 08:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=RNBNM1JDs6K7lS4HDXTXrjRU17NMLO7Ug9qn43kvk/Y=; b=ADGmnFVsb8wH1fHf47jkB2LFoiu+onVJU3ZVVtnEXYGmwtQ1o7KQ29T6Dlfo6vR5Th x1Sqo7s+cxXf07PbEJjdzY8ak//33geIDzPxm2K/U7Mty7maUA8EokD8FCjYJS+b84xc CijZhKJmm7NcwsC8SDs7TAWZJj0SH0dI4gum4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=RNBNM1JDs6K7lS4HDXTXrjRU17NMLO7Ug9qn43kvk/Y=; b=BIIGfRBtE+CWY4At+Nt9nI5fWMVivyGFw92Xwl+yB5OtM4PnTE3252caMnhIxFntel 9PlHYzOrkCQ57EDZ6UcR21l/HJofORI9nASmAS4dTVpPIgN2EkLCvGoF7XBjuC8A2FTz q0xqUGREDZDqjqCbFniAa8YK/c9fbYphd1K2+L2AOutuZeGLawWS0wsp/EpdZyu+fB92 CHdczWIlk+E1umsf4R3HAsk3ZHrnQWwI//oLPcu0kRU+2zsgi2r6nTGt639LKB8cwTRR EAw+eioIDWjwfMX1o56iBjHN8oQ7QSVw+DkwKuoVMW4Gwk08PN0gxFNzoNjbTWwoKu9c mK+g== X-Gm-Message-State: APt69E3ANzH3NPBA6ny07GCJepPighiNtYmlgJIHv6DvsCCnnyvLwVBU MX9otoY9QlFIsIYHLLVzkBfLKt4MQ7w= X-Received: by 2002:a63:6345:: with SMTP id x66-v6mr26240197pgb.43.1530631054340; Tue, 03 Jul 2018 08:17:34 -0700 (PDT) Received: from cloudburst.twiddle.net (97-126-112-211.tukw.qwest.net. [97.126.112.211]) by smtp.gmail.com with ESMTPSA id s185-v6sm4834201pfb.116.2018.07.03.08.17.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Jul 2018 08:17:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 3 Jul 2018 08:17:25 -0700 Message-Id: <20180703151732.29843-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::244 Subject: [Qemu-devel] [PATCH for-3.1 0/7] target/ppc fp cleanups 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: programmingkidx@gmail.com, qemu-ppc@nongnu.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Beginning with John Arbuckle's fdiv test case, clean up some of the fp helpers. As with fdiv, fre and fresqrt are missing divide-by-zero exceptions. I've also noticed that load/store were using arithmetic conversions to/from float32. These should be using the non-arithmetic algorithms listed in the manual. Aside from cleaning up all of the rest of the helpers, I believe that the implementation of the single-precision operations are incorrect. They are currently implemented with the double-precision operation followed by a round-to-single. This causes incorrect results via double rounding. I believe better results could be had by using these non-arithmetic converters to produce float32 operands, use the proper float32 softfloat operations, and then convert back. Anyway, all of this has been broken long enough that it'll need to wait til next devel cycle before anything further gets done. r~ Richard Henderson (7): target/ppc: Enable fp exceptions for user-only target/ppc: Honor fpscr_ze semantics and tidy fdiv target/ppc: Tidy helper_fmul target/ppc: Tidy helper_fadd, helper_fsub target/ppc: Tidy helper_fsqrt target/ppc: Honor fpscr_ze semantics and tidy fre, fresqrt target/ppc: Use non-arithmetic conversions for fp load/store target/ppc/helper.h | 14 +- target/ppc/fpu_helper.c | 294 +++++++++++++++++------------ target/ppc/translate/fp-impl.inc.c | 26 +-- target/ppc/translate_init.inc.c | 2 + 4 files changed, 189 insertions(+), 147 deletions(-) -- 2.17.1