From patchwork Thu Feb 13 14:41:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 183348 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp609771ile; Thu, 13 Feb 2020 06:42:53 -0800 (PST) X-Google-Smtp-Source: APXvYqz8D/QxyoNN6u7f8Zg1FbOulvFAaI4zwFsGvyLOF5Ht3Hs5aYKF+BINsVKo2/RsWr2o3eAg X-Received: by 2002:ac8:f63:: with SMTP id l32mr7449864qtk.327.1581604973833; Thu, 13 Feb 2020 06:42:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581604973; cv=none; d=google.com; s=arc-20160816; b=rsMLg42FE96NRSkXHqECo1BNdrsm0Kx7D60/59BFrfAMwLCjDZzjeoQQkh9fQEqs/7 bk2etwT0i8suGIA5eh0P61XEPDjuBJAaqpYRZS/bycsTXnv6qII8iztGW+LxvoJya6PY Sob3OXkZSWRSxPsDL9JYoPRCLWr2KLx/9+9AhOShHQM29hPmn7qfYdqH32Y6M2r0Mo6Q INTWq0pcUDt2XlsIVXwEXQh2wqeg1UXOd23UBut3gzzjaSXtgfg+/04/j6+rNyjoQ3t5 aLDsOBio/uXZ/6FlOc8bDehpXeS3JYX+FU1LHSnciN3o3nAg47tdnz3jxWQaYbOXpLzL SU3w== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=e6on02dnrs5jFbqtts6LxryeASmr3K7bhWptuLVimw8=; b=FWtFN67MVrg8fUlaltuTbquMiH2Zs55nMMFqoo48k4itW98hh+q/NDgpjU9/lW0C/X FyBwoYM6p+8gaWUnMWh7sPo3V3Z2tZsTGvXKmvzcV2No3qBwYYml7wuVIp8Lh3d036LA tWVUEcUR55sGpRiILaTqRIWuzWWlHdf8M+j3R9YboNUqSKNdQnrKzpSzPC1mIhg1Lagm D4H5Ln+QZaCpli2IgV4tD8P9U4aqDcIkGsPeY6XeCI0Z48Cw4hu/8D7IRS+hEj0tdEN9 /8CQzkt6da4HNuhHpny3vQLH9oyR4nYXIFvbKDjiXqSckhbxLkoM6S+kdCGG7qElr7xM Ns1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UeGJqUI7; 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=pass (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 g38si1302626qtc.147.2020.02.13.06.42.53 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Feb 2020 06:42: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=pass header.i=@linaro.org header.s=google header.b=UeGJqUI7; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2Fhd-0004UV-CI for patch@linaro.org; Thu, 13 Feb 2020 09:42:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60280) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2Fgy-0004Pd-Gb for qemu-devel@nongnu.org; Thu, 13 Feb 2020 09:42:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2Fgx-0001tw-Dd for qemu-devel@nongnu.org; Thu, 13 Feb 2020 09:42:12 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:39376) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2Fgx-0001po-4x for qemu-devel@nongnu.org; Thu, 13 Feb 2020 09:42:11 -0500 Received: by mail-wr1-x42b.google.com with SMTP id y11so6975711wrt.6 for ; Thu, 13 Feb 2020 06:42:11 -0800 (PST) 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=e6on02dnrs5jFbqtts6LxryeASmr3K7bhWptuLVimw8=; b=UeGJqUI7wpuv1FObzUeoBLfEvl1ddgHcyQISgQsQtEzumcQK4j9gi5xtTvlD5eo9RX U3G24aqCVNYuDqaRguUGUgwK8wIsjPD4P2lMmB5c/fx2IBh9JFEHsYBINAEMogMVJfvv U45hlad7VoYj0FnlnZZBgSRRAqa/F+I2NTNB2MFF2ipoILPtLS5/9pcnmUZnsEbU6osO CtGT4v5LRQ/BWxjvlcKqInUBd6HvmmmndLUUHUSWjEPF1R7fy9u0Z1pCltxTdjw+5GNW noQw96kZkGhe42mXCAoxAnkVUE7W6awoW9ih0cdQlldHyDwDnkKDhtiBbR3cSjx06knX 9tdw== 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=e6on02dnrs5jFbqtts6LxryeASmr3K7bhWptuLVimw8=; b=EKlwcB4R0S4zw+iOG54gt94IKsHIrZQZ21qs0VLk0Q5LkrKM8j7rpf13MOPgVV3rBz q2QscgcXK0XqAtiQO1FfFMXXlDAAfaQM/LwOwpiBe75dAW2rmlw3fckLkFKz7D/3pgqA aTImDmbm70sJgHWbAUtMrzwT0Z0J8hVmn2RYmPPEn8P3uMLHZt36BpoGdL8jT7SEup1K TDjR11/VwcEntXeu8//HKGfekD7OMCGZXbjXJEEyiGqZLKGX+4nLmzUIlfQATfASm19E khIi0qJB8FdshWAsV1Al/navKB5MY90QOpcjlZdMuq7RPTDBKVf53dnNY+9NJBHFpfmM KJXg== X-Gm-Message-State: APjAAAVuSbIWm+dFK/R1yFOV0SwbVCmU9eSJd7dgUgyHH+IWWErPlQnn ZdzXyPrLcWM4hBUCKKfF33TuUR/TM+E= X-Received: by 2002:adf:8b54:: with SMTP id v20mr23157437wra.390.1581604926785; Thu, 13 Feb 2020 06:42:06 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id e22sm3362454wme.45.2020.02.13.06.42.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 06:42:06 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 15/46] target/arm: Mask CPSR_J when Jazelle is not enabled Date: Thu, 13 Feb 2020 14:41:14 +0000 Message-Id: <20200213144145.818-16-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213144145.818-1-peter.maydell@linaro.org> References: <20200213144145.818-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::42b 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" From: Richard Henderson The J bit signals Jazelle mode, and so of course is RES0 when the feature is not enabled. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id: 20200208125816.14954-7-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/internals.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/target/arm/internals.h b/target/arm/internals.h index 4d4896fcdcf..0569c96fd94 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -1064,7 +1064,7 @@ static inline bool arm_mmu_idx_is_stage1_of_2(ARMMMUIdx mmu_idx) static inline uint32_t aarch32_cpsr_valid_mask(uint64_t features, const ARMISARegisters *id) { - uint32_t valid = CPSR_M | CPSR_AIF | CPSR_IL | CPSR_NZCV | CPSR_J; + uint32_t valid = CPSR_M | CPSR_AIF | CPSR_IL | CPSR_NZCV; if ((features >> ARM_FEATURE_V4T) & 1) { valid |= CPSR_T; @@ -1078,6 +1078,9 @@ static inline uint32_t aarch32_cpsr_valid_mask(uint64_t features, if ((features >> ARM_FEATURE_THUMB2) & 1) { valid |= CPSR_IT; } + if (isar_feature_jazelle(id)) { + valid |= CPSR_J; + } return valid; }