From nobody Wed Apr 16 16:16:38 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1572598820; cv=none; d=zoho.com; s=zohoarc; b=WkZ5V22GM5Fz2XYOnHjw4/7o+uek/6kCHgRufpbiu6Mgp7JYi3GfqX6obY3/1LNpxep/tTR1f6w0dybwpl9AQPZLS1TJ5/hjYkI2XDW1bOq09cf8X4U84Gw4HsO59D43lBXFxf+6BJadlmvNCBgY/ZIIs0DoXnS02amuk8d0nnc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572598820; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Wh/QH/3UtP8gd1jgQHJ/Qv7q+ZrFPgvBOyLNaqirHw4=; b=XiiPVyAHQQxO0o+TGZ6Mqc4cZBEyQbMHKUSlVTuzRIuhe9PFep+NEaifh+WWm+fSGyvoyge6OmhN4PjF4qXHtfH8IICseE7fYJc59+voAK5E2vpRmeb0a9wvpF1oyNFpaC0FvnJkZFiePKPAEXYCEbQi/gId/PPvIjtRRmFWuJ8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1572598820613232.73702706962524; Fri, 1 Nov 2019 02:00:20 -0700 (PDT) Received: from localhost ([::1]:57626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQSn5-0001j3-Cd for importer@patchew.org; Fri, 01 Nov 2019 05:00:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56599) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQSf3-0001EE-42 for qemu-devel@nongnu.org; Fri, 01 Nov 2019 04:52:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQSf1-0000qx-3H for qemu-devel@nongnu.org; Fri, 01 Nov 2019 04:52:00 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:37136) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iQSf0-0000d0-TO for qemu-devel@nongnu.org; Fri, 01 Nov 2019 04:51:59 -0400 Received: by mail-wm1-x341.google.com with SMTP id q130so8376472wme.2 for ; Fri, 01 Nov 2019 01:51:56 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id d20sm8818922wra.4.2019.11.01.01.51.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2019 01:51:55 -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=Wh/QH/3UtP8gd1jgQHJ/Qv7q+ZrFPgvBOyLNaqirHw4=; b=PcWRJD+2t9c1RwGAyxjqMq/hHwGAencq1Rz+H1oWSHpe2aBI2Vv49/EhUt7sNMkTBu qrYeScn/sm7js4jf2JgWznQgI6ryoC8oULJeyH/keLkFYXO9g5S6mqOy6mBAFlzTr2J9 w2P7Q/JhgVhBUAXovmGrTAgpCIcpFpUPFCY0XpaL91xzXZjSsC2zcGPe4VedocwrczGj rc7hVBddwVuTHiFpI0paq/weOCjLPfRh8U5ALb4UzF12OOUKJFWqDvP+2IayzVQAj8y4 RdO47tGe+BTakUoK0Twh1PGV38pOEI05+Zu92knMLm6uzyqRZ+bpTUtL923A06kySGLf xg8g== 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=Wh/QH/3UtP8gd1jgQHJ/Qv7q+ZrFPgvBOyLNaqirHw4=; b=OtQQ8iU/Mk0G5NZ9M5ahFw7T4WxilEdCpIHffsuWDgQ+MlpeMXGIjBEqJHXlHZQ7CG AmpG03hSBEm056QODIGT1gRDbeJyFsNJJisu/MdERaSfk4LW28J9yqBu5uiJ6z3n1QBY xOw1A7gq824Vf+p9SfkYVv57N02RXIcr06qtAERVd/YHbwQKgS48IiC4TkD+R3plf78q PdUQPBwBeFawt93Zc6fe6J+OUa97WE/cj0GmPHjBlG6y4J1nznbHcA6lxFzhx2doSi3B oTjzTghcZ1BT2+NlpCT9jbNztb5yZKY1r2RgjeHdYu5FUlgt1t1hbNFVzhs+uftHOVCc FUrg== X-Gm-Message-State: APjAAAUi9IAp4/pCzMakRQtkn8xAcYqfgSMP2xqD3VMY/88aaLOGmpnA /f1BGJuIZHXsG4Kozg85oA9pj2DD1NCUEc8Z X-Google-Smtp-Source: APXvYqzIRzau0TZnveTb+rU2IukXzB95XIe4M6w5yQzD89o0iqjdtt+U7CpRjhcMF7ctIWB6MMlPLA== X-Received: by 2002:a7b:ce0c:: with SMTP id m12mr9325256wmc.38.1572598315697; Fri, 01 Nov 2019 01:51:55 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 11/11] target/arm: Allow reading flags from FPSCR for M-profile Date: Fri, 1 Nov 2019 08:51:40 +0000 Message-Id: <20191101085140.5205-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191101085140.5205-1-peter.maydell@linaro.org> References: <20191101085140.5205-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Christophe Lyon rt=3D=3D15 is a special case when reading the flags: it means the destination is APSR. This patch avoids rejecting vmrs apsr_nzcv, fpscr as illegal instruction. Cc: qemu-stable@nongnu.org Signed-off-by: Christophe Lyon Message-id: 20191025095711.10853-1-christophe.lyon@linaro.org [PMM: updated the comment] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-vfp.inc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/arm/translate-vfp.inc.c b/target/arm/translate-vfp.inc.c index 9ae980bef63..85c5ef897be 100644 --- a/target/arm/translate-vfp.inc.c +++ b/target/arm/translate-vfp.inc.c @@ -703,9 +703,10 @@ static bool trans_VMSR_VMRS(DisasContext *s, arg_VMSR_= VMRS *a) if (arm_dc_feature(s, ARM_FEATURE_M)) { /* * The only M-profile VFP vmrs/vmsr sysreg is FPSCR. - * Writes to R15 are UNPREDICTABLE; we choose to undef. + * Accesses to R15 are UNPREDICTABLE; we choose to undef. + * (FPSCR -> r15 is a special case which writes to the PSR flags.) */ - if (a->rt =3D=3D 15 || a->reg !=3D ARM_VFP_FPSCR) { + if (a->rt =3D=3D 15 && (!a->l || a->reg !=3D ARM_VFP_FPSCR)) { return false; } } --=20 2.20.1