From patchwork Thu Jun 13 16:39:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 166723 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1091836ilk; Thu, 13 Jun 2019 11:35:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwixEU4elJXmUpqIVUmChea/ZVHZ5zIuumav3WQkPDNT9hUvX7RhS03nUs1JZKw1sWlaa17 X-Received: by 2002:ac8:5407:: with SMTP id b7mr70192696qtq.48.1560450939823; Thu, 13 Jun 2019 11:35:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560450939; cv=none; d=google.com; s=arc-20160816; b=mDQOvL/y1UtXov4sdxsWL3e1pyysdUiH/Sgf5WvGhpcB7SnFvBG13w6ZeEhp0hGVif XCWZRucDrfUw1ot0EwwlCCU+99w8vHDUpm5kNrS+d8ePwjZu83pjWmUpT9bHtdX0cK9D C92luumEF8EUx7rQo4P4ZouegR/bgnZTnwSMI95EW3PH573KIfDqIppuHNUIgDYR0Lnp 40yVKuNW8AB3PkQ3f7fAo1VPoLd25R1hJWvZlJQZuj6DNpFZottz3eIQWHHNllslJ2AS HDh3a9chtZQ+UDH3FkuFtkOnftV8Mm2Nm+slOX5mYM4TWuZ7fo0z8ZAyQGATuZng3i8/ S7tw== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=vi4fuS6trrxryGpXVQHQgicRuxlNLJ/gRR72lTmjq/A=; b=aDWzwdB5R1thl/0hRsA8RGq+M7qT+78gFGm21En9g20AkxP22Y42cnb9BDn8dd6aD6 bNjVhdv5QmyqGDJbRMcs08LElupt06Ii3RmF5/KVZCq/5RKv4hcorsPc05tkgpYYfgG3 dlZlRLRCe1JvxXUzDtNnS+LVS37b5DPCpuI1sBGm9OAubjEfwnDYdXKv8ERxth+uzWcN sPcorsnOQLjCO3VDfkqQsabl0ySMlWYTaxgcAXlSkrXEs11/DDqX9aKrUWI5pr8t1IDx 5mqC+dEFx/K/lBTkr5cqaaZLoFABqTZYfMUVe87/ee6PI6HC5w13f4EwXeu2Yk1qerwT pj9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rScZ2W9Y; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id p57si274044qtc.217.2019.06.13.11.35.39 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Jun 2019 11:35:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rScZ2W9Y; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:43498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbUZW-0005fw-GU for patch@linaro.org; Thu, 13 Jun 2019 14:35:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53674) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSlF-0003uX-6S for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbSlD-0003HL-78 for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:36 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:32769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbSl8-00025H-Sq for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:32 -0400 Received: by mail-wr1-x442.google.com with SMTP id n9so21554809wru.0 for ; Thu, 13 Jun 2019 09:39:23 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=vi4fuS6trrxryGpXVQHQgicRuxlNLJ/gRR72lTmjq/A=; b=rScZ2W9YLKkFihqFm6aSR6MHhwsWKG3a37gRHHLVmhQHEveS32ARV/ikKswpYuKKlt A+CXDlcQgpn871h/qf2vl7uQXtUMgngRmdnLJnYE5jIPc1s7dAfFg+siI6SY5IV7JQvc Xn5SJnzsN+HoVI+FvfNQud7ByQqS9tgNod6xMHxzHHyYs+6q6DL3XEgJoNQPoGOq8ohT eFX5Ox7GDpJM8+Q7NQRXxc+SFf+8me5m65x8MhIpBFrEi998gj3Hdw3WzCZXnj6mQcks cyI4HImQze/Yh8tMh33t5IDuohomsO9DX/cbnyE3lDl3TAJThZu+lYow5GEfhWUMvdn1 /Htg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=vi4fuS6trrxryGpXVQHQgicRuxlNLJ/gRR72lTmjq/A=; b=bEhVplDPvsDw0w7PMmOUV+iYRgFZdchyhNZ+omdm19gXUc8oxXWGYnAZMdMG+8OX4c mB+jwbtT4LXVPWM9tXMnI3xgJLIeBZv6PogHLPMQGFypJwwd5HeDJvsmfi6l1YiVrEZH 45TqyT9Lr4RVM/fgSTksnlCUcT1J9u87n2Vag7O2PAq8gTLOj0OdCONJd1bld/LXmIPE MXfYifYeSxiQ+lZx+SRqQ61aA9ZiZ9LENfng1+svzqe06b8Ifi1WkP74dnax5e6zbTpy pOi0sSW7A1rLvVldBA1ynRqj73nvZOg2sHAp0ajgo7fa9aQhVakqx6U+zRPf9c8EQJXw KooQ== X-Gm-Message-State: APjAAAUHDtZwzTIOmHUZy/TxRzKtwu+ZWX+pcQVAV9J2aMgB69qvNBH8 TPvTEeWvoVCBzYNaSMiDzKgysWbdcIdijA== X-Received: by 2002:a5d:6b12:: with SMTP id v18mr61452916wrw.306.1560443962570; Thu, 13 Jun 2019 09:39:22 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f197sm358747wme.39.2019.06.13.09.39.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 09:39:22 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 17:39:08 +0100 Message-Id: <20190613163917.28589-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613163917.28589-1-peter.maydell@linaro.org> References: <20190613163917.28589-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH 03/12] target/arm: Stop using cpu_F0s for NEON_2RM_VABS_F X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Where Neon instructions are floating point operations, we mostly use the old VFP utility functions like gen_vfp_abs() which work on the TCG globals cpu_F0s and cpu_F1s. The Neon for-each-element loop conditionally loads the inputs into either a plain old TCG temporary for most operations or into cpu_F0s for float operations, and similarly stores back either cpu_F0s or the temporary. Switch NEON_2RM_VABS_F away from using cpu_F0s, and update neon_2rm_is_float_op() accordingly. Signed-off-by: Peter Maydell --- target/arm/translate.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/target/arm/translate.c b/target/arm/translate.c index c274c8b4602..a10fded1f39 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -1374,14 +1374,6 @@ static TCGv_ptr get_fpstatus_ptr(int neon) return statusptr; } -static inline void gen_vfp_abs(int dp) -{ - if (dp) - gen_helper_vfp_absd(cpu_F0d, cpu_F0d); - else - gen_helper_vfp_abss(cpu_F0s, cpu_F0s); -} - static inline void gen_vfp_neg(int dp) { if (dp) @@ -4191,8 +4183,13 @@ static const uint8_t neon_3r_sizes[] = { static int neon_2rm_is_float_op(int op) { - /* Return true if this neon 2reg-misc op is float-to-float */ - return (op == NEON_2RM_VABS_F || op == NEON_2RM_VNEG_F || + /* + * Return true if this neon 2reg-misc op is float-to-float. + * This is not a property of the operation but of our code -- + * what we are asking here is "does the code for this case in + * the Neon for-each-pass loop use cpu_F0s?". + */ + return (op == NEON_2RM_VNEG_F || (op >= NEON_2RM_VRINTN && op <= NEON_2RM_VRINTZ) || op == NEON_2RM_VRINTM || (op >= NEON_2RM_VRINTP && op <= NEON_2RM_VCVTMS) || @@ -6761,7 +6758,7 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn) break; } case NEON_2RM_VABS_F: - gen_vfp_abs(0); + gen_helper_vfp_abss(tmp, tmp); break; case NEON_2RM_VNEG_F: gen_vfp_neg(0);