From patchwork Mon Feb 24 22:22:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 183792 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp928587ile; Mon, 24 Feb 2020 14:31:53 -0800 (PST) X-Google-Smtp-Source: APXvYqz2+bWAFxQD5X4htwauD2oX5weNym6iNJfAHlo3BC8ck37dxM6b2yv0+tY1MQGL7XmYKtz6 X-Received: by 2002:ad4:518b:: with SMTP id b11mr48284630qvp.195.1582583513298; Mon, 24 Feb 2020 14:31:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582583513; cv=none; d=google.com; s=arc-20160816; b=jo2sNtnDN7BMNe91zjps69Li+sYQ94b5BOP+dCdN8Lk9eodT5XRFTVve6Y+z+Sf8RE CQgINBI+E1ecpDjIF7Cvg4fEnmMczTLHNeBQ+K8hEahiU6cCrIeN4Mgu1bkvmlfmhC4y ekLM/i5mACM6G2eOD+5gVgUDDLH+fs/5aHl2vK4B04jULINmSlbq+PAYuufBWoplZAXN 9lJ/AGPqYglt3gmulJAHrxz9cZhRpAb0zW4/C8t7AhF2uKGBBCJhOQvZhn2A5NrlW3d0 kk8vGovCMT6MuJKwXwW/xJTE1dMcWTv365f64KM/Moghv6XOBLq4IX6rVS4Oo1zCHXyj PcHw== 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=+KPvmzpCR5seSYv8kHpAw1AZPr6kKDFij7TNxO0T5iM=; b=g5m+GO4rbV7p6fqwfUn1oRbZXiw0q+40m0/XR6tLkKjkw7tGBIIsIE4pj3d2UuGx1f +vHgN4NXgtbVMK0OeImNSJS0PXbu3rnx57E5OPI3mYacTp1O2cRCx0bi9CbEWaH7t0Mt epLpt7a9OwFcIpIsl0PYWONjWB4Kg5ZxO/NUGv3r/lVuBz2yKQ4w79TQsI91gXDuC06a EZvG57+koYYVi1dPzvj0qOmio1W6LznPtZsrRQRtQvjbZQIITMISzlAyOtkvBcm9pXeQ QoiMKP26bPSSJAgR9GbWAxdmVmxJOtBNvzspgtD2g6OeH7JRTfX6+TYurOvFpirL+4Fy GZsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Uqbxg0jS; 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 w23si7419685qka.223.2020.02.24.14.31.53 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Feb 2020 14:31:53 -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=Uqbxg0jS; 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]:45448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6MGW-0003VI-OT for patch@linaro.org; Mon, 24 Feb 2020 17:31:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37723) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6M7d-00043h-1z for qemu-devel@nongnu.org; Mon, 24 Feb 2020 17:22:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6M7b-0005mb-Uw for qemu-devel@nongnu.org; Mon, 24 Feb 2020 17:22:40 -0500 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:45681) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6M7b-0005kz-Og for qemu-devel@nongnu.org; Mon, 24 Feb 2020 17:22:39 -0500 Received: by mail-pf1-x442.google.com with SMTP id 2so6053155pfg.12 for ; Mon, 24 Feb 2020 14:22:39 -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=+KPvmzpCR5seSYv8kHpAw1AZPr6kKDFij7TNxO0T5iM=; b=Uqbxg0jSTQpcnURf4xEmKosWe03wCLnDnGlU62zj/rU1xQnYsUL6vQG0jaC9wVQPXK WtQff6VthTSvakTFz3/W48U2KAmz1ecxTW2YtTKKJcpUBA5mFUF66a+hScksICwFjzFp 6Jx+BTSAHh5bSaUNHhiG+8my02XfdjFc9oxNwoPRWYeAuVVrEvZwX4AvVmIPGtSwtE/V GiMAskG/CbY5Y4X2h09T25GrenbWLQwWBergpjA/5zPM8bhnIbpRmbe/OcqIYL6bu469 PE00pxAprU2rjHmVybQtqoMaC9amatDPxORqbb3//kIu0dbLah9VUG7vdo6iOM8n1ECW il7g== 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=+KPvmzpCR5seSYv8kHpAw1AZPr6kKDFij7TNxO0T5iM=; b=tcjG2SEzxHT/aIEhNs+iUSHZFXYFnbuWyYGGxgE+yUtEAhPe9iB+qipYfUK2hkHdOL jM+DshqIbWhzu/rrYsLY3G8UUW0CWwKiVzhKKWvllIckp+N4zaC9qHzD0b5lhmKAzMd0 WbZqA0sUnbb7j0Lj2PSpqbTnYayypNfbZQXsQu1/1LIo5Hy1W71c4M4rp3kYnDSMYSN5 qtDjaP7+IRLJriSzwM1IgVt3v92CSM4hNNAKEcme1IQNZScbNxuCUJ77C62h4mOKwxM4 FVAsmXfswlXWC1Cli78HIwHkU/H8mx+u9MprKbAKcvwNLl2PxJ9Qh4oK9iKaybh2n+l7 a19w== X-Gm-Message-State: APjAAAXhWkFPer01NmA8BIdWo7AObRBoV2QkCZ1z8SaczI/l8hen1T5C DbpzT44rMMjKqXOAdpHfn4Ju0Daj+8k= X-Received: by 2002:aa7:8ad9:: with SMTP id b25mr53268382pfd.70.1582582958411; Mon, 24 Feb 2020 14:22:38 -0800 (PST) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id o6sm13897097pgg.37.2020.02.24.14.22.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 14:22:37 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 03/17] target/arm: Add isar_feature_aa32_{fpsp_v2, fpsp_v3, fpdp_v3} Date: Mon, 24 Feb 2020 14:22:18 -0800 Message-Id: <20200224222232.13807-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200224222232.13807-1-richard.henderson@linaro.org> References: <20200224222232.13807-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::442 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, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We will shortly use these to test for VFPv2 and VFPv3 in different situations. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) -- 2.20.1 diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 1e6eac0cd2..f7a90f512e 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -3470,12 +3470,30 @@ static inline bool isar_feature_aa32_fpshvec(const ARMISARegisters *id) return FIELD_EX32(id->mvfr0, MVFR0, FPSHVEC) > 0; } +static inline bool isar_feature_aa32_fpsp_v2(const ARMISARegisters *id) +{ + /* Return true if CPU supports single precision floating point, VFPv2 */ + return FIELD_EX32(id->mvfr0, MVFR0, FPSP) > 0; +} + +static inline bool isar_feature_aa32_fpsp_v3(const ARMISARegisters *id) +{ + /* Return true if CPU supports single precision floating point, VFPv3 */ + return FIELD_EX32(id->mvfr0, MVFR0, FPSP) >= 2; +} + static inline bool isar_feature_aa32_fpdp_v2(const ARMISARegisters *id) { /* Return true if CPU supports double precision floating point, VFPv2 */ return FIELD_EX32(id->mvfr0, MVFR0, FPDP) > 0; } +static inline bool isar_feature_aa32_fpdp_v3(const ARMISARegisters *id) +{ + /* Return true if CPU supports double precision floating point, VFPv3 */ + return FIELD_EX32(id->mvfr0, MVFR0, FPDP) >= 2; +} + /* * We always set the FP and SIMD FP16 fields to indicate identical * levels of support (assuming SIMD is implemented at all), so