From patchwork Thu Jun 13 12:13:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 166620 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp705607ilk; Thu, 13 Jun 2019 05:37:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzhfpNsKCfy4oe3Oh548wzhJE7EIRKelJtsgYM+Y10rzXqMUAa0YwlJO+GvmIYYypckWZHP X-Received: by 2002:a37:68d2:: with SMTP id d201mr71855379qkc.65.1560429441328; Thu, 13 Jun 2019 05:37:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560429441; cv=none; d=google.com; s=arc-20160816; b=zv8du+rN5II5fRmoF/uTujgWVGlWYTQYsdPaCjcX6rKc2Z2fCJSlDUAU/9jgWcAnKY W6lWShT/bjA7FqJP2of9e6S08gxrEvi4re6PD07vdxbn7Lqf+MGQPDx3cGlZk8utPnW9 evOMIrOBX1Sv2JJrnsr5yzIcpVLrpxmJwdg3THQDBZTSSdMt4Kmq9BUTWhYhRumQoR9G z7zu3aVr7GiPq2B+6mZSm28TiK/MNXKwXMLqpDkvTC4qGdohRtm9YCsWe7qN9jspxo+s EmByjDHwhC1a0mZ3xpftW1EJSYU7CoSzWvS2fFJAgGF9cPAlVUXYZ+CiwYMVkTGo4T3l KXKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=xzAVSfrVvqiX6ekYDb41MECWbYD3g8yVOK49nEoLOVo=; b=Xp+820rTijduZXs7ZFPU+Olm3EELFzpZgQ5SVTyGjZxER4Y0wwQTKuDwKZCT2gZUO9 r9O3/zrN9r3rZYuVfeo/VzdWw5KNfqTCkXgRhw6BRkrGuqE1L6/4yhL+craJ2aUwfEPi LbzvP60KsH1TxQ/+rH5rx30JiuRRJgn+w7lSG8y02VFXHVdVivHAOlYjYAmOG6wYqrA4 C+a1L/IP/4Z0FBHB1Nk24z3q3ToTzOGGTswXqWFmCMvZvDRkWyqMqfj8rooMcRVonkGL m8zc11rSeFQJD49f3dt6Q1RTyDvFIMtrANXRNZXw/G0Pii5C4uohDaQDKt6tb+0q23Oi fbJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="mnyNbH/S"; 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 i42si1809989qta.108.2019.06.13.05.37.21 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Jun 2019 05:37:21 -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="mnyNbH/S"; 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]:39434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbOym-0005G4-UL for patch@linaro.org; Thu, 13 Jun 2019 08:37:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58880) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbOd9-0007uu-Va for qemu-devel@nongnu.org; Thu, 13 Jun 2019 08:15:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbOd6-00048x-1m for qemu-devel@nongnu.org; Thu, 13 Jun 2019 08:14:59 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:40295) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbOcz-0003zq-RL for qemu-devel@nongnu.org; Thu, 13 Jun 2019 08:14:51 -0400 Received: by mail-wm1-x341.google.com with SMTP id v19so9867924wmj.5 for ; Thu, 13 Jun 2019 05:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=xzAVSfrVvqiX6ekYDb41MECWbYD3g8yVOK49nEoLOVo=; b=mnyNbH/ScqCopaOa5U/yB7M2FwK5+19T2DjqQMZv+EUVTo404O72KPHrAWlRooiTuq ugQsyUjg8QpJn/OuJTC+G0DlwLzJh+ejJpBHPF2M0x7bgf4lwUAbV+3dlAQu6857wbyf 0sXTGVQ9qLur7vf8f1YxSzE9FvI8pTtwcs4cJ4KiSDSVAB559FoH9/zh6/XJplq6Xbfl Lx78YLn/hcDp9R1zNQbJdVTvgMRQZxHFeKuD84iqk8V2idVlvL9HQFw5mL3ezR3LKOOG GXDTnoMZxfYBAeXzcr5a3aZTkHochqark9YE9Wf81DkWCSZXkT02B3RzFdCB1+1g9Acc S9ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xzAVSfrVvqiX6ekYDb41MECWbYD3g8yVOK49nEoLOVo=; b=SpG3IoMVrTPDwlXtaYYg/mnpurpCOp82fUoEVkwX4CeDB1e8QSRMX1P0TRYX6yzBbZ SfWbzkhWGDUNHrQieVq2ipW3OVuLLGGy+8tmu35bVfz5ixqEWjiWwRXTbMfSEIhTEY8N 2Z/EUfYMs5NMnqJIBml2W0mQUBeKhpKfHQQW8TrOfRzGdbe8iUdPAnlyw7Y7DCbqIW6U pfnQrT7udSLG7xfFZJ87tRCYM7qTIaH/SUPVnU7fsgyXnHT35pvUtXd6FYlbL/JXJM4i NYhjTKgRqCxdGCIJXKN4Avb6hikNzqN6Z/e9nmZ44l3WFhZzh+jM260Laky8ven8FSNv wEwA== X-Gm-Message-State: APjAAAWOnIERp9CakqypXi2RF/uG+m3nsQvCMSMizSLGL8zT9GvM7RtZ Rv0J1Hj08UYh6Uqz8wj+gCxLnV/wmRhXZw== X-Received: by 2002:a1c:3:: with SMTP id 3mr3727207wma.44.1560428087314; Thu, 13 Jun 2019 05:14:47 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id y6sm2010576wrp.12.2019.06.13.05.14.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 05:14:46 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 13:13:56 +0100 Message-Id: <20190613121433.5246-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613121433.5246-1-peter.maydell@linaro.org> References: <20190613121433.5246-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::341 Subject: [Qemu-devel] [PULL 11/48] target/arm: Explicitly enable VFP short-vectors for aarch32 -cpu max 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" At the moment our -cpu max for AArch32 supports VFP short-vectors because we always implement them, even for CPUs which should not have them. The following commits are going to switch to using the correct ID-register-check to enable or disable short vector support, so we need to turn it on explicitly for -cpu max, because Cortex-A15 doesn't implement it. We don't enable this for the AArch64 -cpu max, because the v8A architecture never supports short-vectors. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/cpu.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.20.1 diff --git a/target/arm/cpu.c b/target/arm/cpu.c index c8441fc07b7..2335659a852 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2023,6 +2023,10 @@ static void arm_max_initfn(Object *obj) kvm_arm_set_cpu_features_from_host(cpu); } else { cortex_a15_initfn(obj); + + /* old-style VFP short-vector support */ + cpu->isar.mvfr0 = FIELD_DP32(cpu->isar.mvfr0, MVFR0, FPSHVEC, 1); + #ifdef CONFIG_USER_ONLY /* We don't set these in system emulation mode for the moment, * since we don't correctly set (all of) the ID registers to