From patchwork Fri Feb 14 18:15:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 183517 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp2131525ile; Fri, 14 Feb 2020 10:24:55 -0800 (PST) X-Google-Smtp-Source: APXvYqy/GQEqtTHyxQ/jvUh4c3RKYXJYaj7/kiLkHyyZlOoSNVu6o0Aa22+AYYl5mq9lRDCK0SB1 X-Received: by 2002:a05:620a:545:: with SMTP id o5mr3728860qko.27.1581704695163; Fri, 14 Feb 2020 10:24:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581704695; cv=none; d=google.com; s=arc-20160816; b=cW881aAJoz3QfBzVsGoKm2npRyeiEgp7xZMWVLSxLJwG82RuJG508ppeizOI6EgQ6u 4OPOchE7Bk8tFnffrAv4LbmYLYQZwklTnGQrC4zY+oOPhFkvbiE+RK+RvIG4Py/862/Z Ivg2e8elhR5KgHCzW2xIkisWwZpmTh+5W+sjBsxy1dPZ9n7hImFV3EAt0uG5v80pEte3 Waz1YuYdgR8twGqv0RWzF1Aa+9rcxE9PURa9IlZGyvfx6QnfrF6DhBm81WxdkG0HJCgC 5bIaNAqZ01XoX6CzlADRhWHJYgBJTwksOLA3Q5THsiQKAmtbaIjeC9TkC2z134FQatAF FsPA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=pElnR5+ZNReOFV25D5Wd4OZyDSMZOeR76smz6O5bwn4=; b=vwfHun71GLDbdBzXlFA+nyyvf876MHZThiyGOQmfEa36cOsTOI+jEPTydOu7Prk7xQ mRSx5giR+Uby+IVDlJlDKqAQKUCrt5/4M24VjPXseYRxOEquenCWYtKjpWUJ+qzpfjzC A7I/RMPUW/XvM4zrfnfqFo5bR2P/edSmULcoOr8ZomyysM+dRKhicSS2AaxKaZwGTdld uHGpf05J66S7kOfyac1JpCgADkgEmO421qGd9H1VmCNxQhOwUy/fjdDC6Yblhjlp1bQT OcyTd/nGmTPr7nq9+FFUqHoiXTi/HpLNvh63W3mFaFkfDowalxyU1sRemU33NgMXn7d1 Alsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hjUdmAd3; 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 1si3211485qki.364.2020.02.14.10.24.55 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Feb 2020 10:24:55 -0800 (PST) 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=hjUdmAd3; 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]:43752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2fe2-0005FH-Mj for patch@linaro.org; Fri, 14 Feb 2020 13:24:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60865) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2fVS-0004Nr-2B for qemu-devel@nongnu.org; Fri, 14 Feb 2020 13:16:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2fVQ-0000Dw-N4 for qemu-devel@nongnu.org; Fri, 14 Feb 2020 13:16:01 -0500 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:41000) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2fVQ-0000Ci-GS for qemu-devel@nongnu.org; Fri, 14 Feb 2020 13:16:00 -0500 Received: by mail-pl1-x644.google.com with SMTP id t14so4012132plr.8 for ; Fri, 14 Feb 2020 10:16:00 -0800 (PST) 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=pElnR5+ZNReOFV25D5Wd4OZyDSMZOeR76smz6O5bwn4=; b=hjUdmAd37aNlIq8IPlsbcSfAKHSjpi6isiDOKLK17Crix6/2Ymba1cQmYhnge/Av9z WQmvvodmneZ9sDBJo/ItH1l55Zg63Ygi0+aR+eMbROTckEjyrWpFgNKdMJIGLQn9tMez IrU7qvvsbODT/yzg4IwAVlcy2NQDaLZuA8FDOGhcZeZqkK6uqRTrgjE+7MNAodMAzUw2 ZGI8HiYrrMVoVr5jW+/IKGGml4jA7vlmGuLfGs1jZFtgXen0dibBseQpFqEtx36IE2Ls mq/7ueBm4EK1aDCvaXfde3W9bsXd++1055DVx9I/B5RKfo58VP1nEVS3D5J0UfZuefVZ P5Zg== 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=pElnR5+ZNReOFV25D5Wd4OZyDSMZOeR76smz6O5bwn4=; b=G0HWUj22hzV3Altaznz3kdLgwYrJu0hzNjy0pRjXzlR4iiu8lyXjMTF11RQ5sxJYL3 9gAuFcrR26mt7Xj8mnwC8+Iaku5ddqfQdKJT8YDGlbp8W5s3TwMztNX1NXiqOAkarF2I OTsqWKu0IKn19upbYeOBeQ3iH9JZV6mpmCs0MR59rTs6lPMfClp6PvfW46sZlUOHLSQY 6Uac0OcxbH8B49uGVQbq5J7GUiwYEc1GKTLIY9uDnBsEEokTMTvz0JMFlUwrf9AbdOdj /tZi7gF6LUoSzSQ+pTXuAn/3cYwFyjKtjh7iol22NZTEsYWnFm9DeFtq/IJknAl0U0vb FV6g== X-Gm-Message-State: APjAAAWfFbMJ4MbwbGHEXtKD7oHyFRxn5hnw3wayHAaiTqadzSqIAmKm NSlhkoRIqDnPgq4B2x/XRfWEfAfyNT0= X-Received: by 2002:a17:902:7b92:: with SMTP id w18mr4534765pll.72.1581704159122; Fri, 14 Feb 2020 10:15:59 -0800 (PST) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id i3sm7525123pfg.94.2020.02.14.10.15.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2020 10:15:58 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 09/19] target/arm: Replace ARM_FEATURE_VFP3 checks with fp{sp, dp}_v3 Date: Fri, 14 Feb 2020 10:15:37 -0800 Message-Id: <20200214181547.21408-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200214181547.21408-1-richard.henderson@linaro.org> References: <20200214181547.21408-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::644 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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Sort this check to the start of a trans_* function. Merge this with any existing test for fpdp_v2. Signed-off-by: Richard Henderson --- target/arm/translate-vfp.inc.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) -- 2.20.1 Reviewed-by: Peter Maydell diff --git a/target/arm/translate-vfp.inc.c b/target/arm/translate-vfp.inc.c index 0c55140127..9e5516f208 100644 --- a/target/arm/translate-vfp.inc.c +++ b/target/arm/translate-vfp.inc.c @@ -717,7 +717,7 @@ static bool trans_VMSR_VMRS(DisasContext *s, arg_VMSR_VMRS *a) * VFPv2 allows access to FPSID from userspace; VFPv3 restricts * all ID registers to privileged access only. */ - if (IS_USER(s) && arm_dc_feature(s, ARM_FEATURE_VFP3)) { + if (IS_USER(s) && dc_isar_feature(aa32_fpsp_v3, s)) { return false; } ignore_vfp_enabled = true; @@ -746,7 +746,7 @@ static bool trans_VMSR_VMRS(DisasContext *s, arg_VMSR_VMRS *a) case ARM_VFP_FPINST: case ARM_VFP_FPINST2: /* Not present in VFPv3 */ - if (IS_USER(s) || arm_dc_feature(s, ARM_FEATURE_VFP3)) { + if (IS_USER(s) || dc_isar_feature(aa32_fpsp_v3, s)) { return false; } break; @@ -1871,12 +1871,12 @@ static bool trans_VMOV_imm_sp(DisasContext *s, arg_VMOV_imm_sp *a) vd = a->vd; - if (!dc_isar_feature(aa32_fpshvec, s) && - (veclen != 0 || s->vec_stride != 0)) { + if (!dc_isar_feature(aa32_fpsp_v3, s)) { return false; } - if (!arm_dc_feature(s, ARM_FEATURE_VFP3)) { + if (!dc_isar_feature(aa32_fpshvec, s) && + (veclen != 0 || s->vec_stride != 0)) { return false; } @@ -1921,7 +1921,7 @@ static bool trans_VMOV_imm_dp(DisasContext *s, arg_VMOV_imm_dp *a) vd = a->vd; - if (!dc_isar_feature(aa32_fpdp_v2, s)) { + if (!dc_isar_feature(aa32_fpdp_v3, s)) { return false; } @@ -1935,10 +1935,6 @@ static bool trans_VMOV_imm_dp(DisasContext *s, arg_VMOV_imm_dp *a) return false; } - if (!arm_dc_feature(s, ARM_FEATURE_VFP3)) { - return false; - } - if (!vfp_access_check(s)) { return true; } @@ -2563,7 +2559,7 @@ static bool trans_VCVT_fix_sp(DisasContext *s, arg_VCVT_fix_sp *a) TCGv_ptr fpst; int frac_bits; - if (!arm_dc_feature(s, ARM_FEATURE_VFP3)) { + if (!dc_isar_feature(aa32_fpsp_v3, s)) { return false; } @@ -2623,11 +2619,7 @@ static bool trans_VCVT_fix_dp(DisasContext *s, arg_VCVT_fix_dp *a) TCGv_ptr fpst; int frac_bits; - if (!dc_isar_feature(aa32_fpdp_v2, s)) { - return false; - } - - if (!arm_dc_feature(s, ARM_FEATURE_VFP3)) { + if (!dc_isar_feature(aa32_fpdp_v3, s)) { return false; }