From patchwork Fri Oct 25 09:57:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 177717 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3450479ill; Fri, 25 Oct 2019 03:03:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqySCMEkUxc2r2g7rP4KK+jqRsGkNwwBnAYLrLqMKg4mEGeO/q0H12Jf/NvOpX6sGr36sq52 X-Received: by 2002:a37:4142:: with SMTP id o63mr811092qka.102.1571997786453; Fri, 25 Oct 2019 03:03:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571997786; cv=none; d=google.com; s=arc-20160816; b=I0EY3pSHD7t7aZxKK41BSPEfSdw/QXPa712sFsibifBas7jlIE2NYuN8VzQq8ggwjw wA0IPgI9OyELecA8j9hQ06yEntVeFRnIR7Io0Srx1nQhG1imiYy5zee1AUb0vkfIM98G R8XU213PwdMc9LvyUuKac98pElKMxFT7dTSpNZjLztUiyVm/jSHKAft6FUDwndHCd0f2 ++HLvFCPmyJjY6B9fGOm5jmofnx+wI48aQBR6qoBExMlgamiFXcitLPe5edIC+o31BUX VgrYcXgz8O68GjV2wvwKW53jqV+pKDwEJlAfXieXFtnuriKX5eo9CcUftTSbfo0LMKYJ kEug== 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:message-id:date:subject:to:from :dkim-signature; bh=8ck//FtWXf6SZ9Hwguc/y5XScjEWNqWkVYUfldEqueU=; b=LxKcF+JybWOqRzkzih+A3PEKfHvqB295Ioydsup76veX3xlfoiezX9uh/HV+0fDPmo +0eKkb2LnVTe40R5/2QtnkLVaMJ1aZ8co7rHdXL15igvK7J6NTSmXRlDOZplh+hoBlm5 vLn0yNC5DOFMVbrbo6znTpz+V9Ilrd8R84AB3e8jfVU47H39OCp9//nkrJA/JJ72D7OT Bnc0cnq+Ha2IINCXkGxcY9r5VjAeWiPbr4PMR+bLDi2VPUMcXw0S9aBumnELKHToOnNU t6IG1KeoQyMDxD0GZcMaAHSNi29vntpQIjq/MukFjo31Osw9BF9jwVjCI7LeUnQi35nt c0WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=oGev+YiX; 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 1si977132qtv.100.2019.10.25.03.03.06 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Oct 2019 03:03:06 -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=oGev+YiX; 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]:58208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNwQz-0007XO-Rq for patch@linaro.org; Fri, 25 Oct 2019 06:03:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60659) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNwMs-0005sE-NO for qemu-devel@nongnu.org; Fri, 25 Oct 2019 05:58:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNwMp-0004US-4D for qemu-devel@nongnu.org; Fri, 25 Oct 2019 05:58:49 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:34989) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNwLS-0003XS-Qd for qemu-devel@nongnu.org; Fri, 25 Oct 2019 05:58:45 -0400 Received: by mail-wr1-x442.google.com with SMTP id l10so1598212wrb.2 for ; Fri, 25 Oct 2019 02:57:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=8ck//FtWXf6SZ9Hwguc/y5XScjEWNqWkVYUfldEqueU=; b=oGev+YiXV+wRKDVKe1aGDyB5g2JQWEvnFKLjQYsfnxPpS68+bt4vkBRaMfJq0YbtkD dBqT7jKUpwl+wJVoSVtJZzdnmnAYbeRD1snNQHQzkvT1OQNq/HWb/reApCk4nq1vr0GK q3XtNPRjB4Gu7wH0Rpt+Rfyz5MihOtDJsfd42BPY4GzpKqwkR78BD3ynJVNL95QCzGJw VmiYkzu5cmLAeo8WLa9JSNK7NRSdMuomROdfipb8/PBew0zUIZHG5hlsVmOx88HmglEe jvLEzGBQtn0NbuM+YMPuELvf90qVwzCb8yCsPoakPpHvC5DRbpCNMrmWdjj85T5Ea964 oKow== 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; bh=8ck//FtWXf6SZ9Hwguc/y5XScjEWNqWkVYUfldEqueU=; b=owOo6q6UBPvHIz5eHvRqOAqnsBT1MmPKiG2j8lWMIeEKq/rWuDro2ZgQryfEJibzRV Act1jhXik5w+NLTZo0v/SE6p1VQg3vD39zJqLwcGXoVyn9SyNXLUW1QLJMFxOXIQc1MO Vq2a4tE7wHwfrGxV5JQXm/iMxKqEPK5PO1OgpaWK30Z4x3pbTQ/Zl1AyH85fFsbjSyTQ HKoktAHRL1ShKL8wiNago10/kuJ9jWBANrxWXgloqYdsmhNFYcDHkIP+JY1SN+0zvqA3 tfupLG8udyN3jCA3b3EMnZQzymUPtn4zIV1WlcU+ZvzOhXp9IKB3uhuszxD4x0LjiJk2 Og4g== X-Gm-Message-State: APjAAAV60ZJ/NB9UujEYWEHTu/wrb3HMyRPhGqxxR7cHFQg8NmFA248b c74qQtDK1driMs6wk+ObLd98mQsJAIQ= X-Received: by 2002:a5d:640e:: with SMTP id z14mr2105552wru.311.1571997441219; Fri, 25 Oct 2019 02:57:21 -0700 (PDT) Received: from babel.clyon.hd.free.fr ([2a01:e0a:283:3130:606f:6dc3:545e:fa5c]) by smtp.gmail.com with ESMTPSA id g17sm1651216wrq.58.2019.10.25.02.57.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 02:57:20 -0700 (PDT) From: Christophe Lyon To: qemu-devel@nongnu.org Subject: [PATCH 1/1] target/arm: Allow reading flags from FPSCR for M-profile Date: Fri, 25 Oct 2019 11:57:11 +0200 Message-Id: <20191025095711.10853-1-christophe.lyon@linaro.org> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450: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, Christophe Lyon , richard.henderson@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" rt==15 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. Signed-off-by: Christophe Lyon --- target/arm/translate-vfp.inc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/target/arm/translate-vfp.inc.c b/target/arm/translate-vfp.inc.c index 9ae980b..82bed5b 100644 --- a/target/arm/translate-vfp.inc.c +++ b/target/arm/translate-vfp.inc.c @@ -705,7 +705,7 @@ static bool trans_VMSR_VMRS(DisasContext *s, arg_VMSR_VMRS *a) * The only M-profile VFP vmrs/vmsr sysreg is FPSCR. * Writes to R15 are UNPREDICTABLE; we choose to undef. */ - if (a->rt == 15 || a->reg != ARM_VFP_FPSCR) { + if (a->rt == 15 && (!a->l || a->reg != ARM_VFP_FPSCR)) { return false; } }