From nobody Thu May 2 19:33:26 2024 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=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549450589786597.2690542020133; Wed, 6 Feb 2019 02:56:29 -0800 (PST) Received: from localhost ([127.0.0.1]:48465 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grKsR-0005X8-SW for importer@patchew.org; Wed, 06 Feb 2019 05:56:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grKpw-0003k8-Fl for qemu-devel@nongnu.org; Wed, 06 Feb 2019 05:53:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grKpv-00006p-K8 for qemu-devel@nongnu.org; Wed, 06 Feb 2019 05:53:48 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:46977) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grKpv-000063-AA for qemu-devel@nongnu.org; Wed, 06 Feb 2019 05:53:47 -0500 Received: by mail-wr1-x42e.google.com with SMTP id l9so6940826wrt.13 for ; Wed, 06 Feb 2019 02:53:46 -0800 (PST) Received: from cloudburst.twiddle.net.com ([212.187.182.166]) by smtp.gmail.com with ESMTPSA id v4sm16421568wme.6.2019.02.06.02.53.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Feb 2019 02:53:44 -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; bh=WtwaLuEmGz2yNPjRTmxzhujSTXwd6dANkCO5wqXe344=; b=ksN4ZgjTtmSW+8DzPMz5ZJHxJzj20iYSTLtAKKfE1bCYCLd+9HSmVMuPzCQC1DxkPQ GMa0ne8jyevK1FN3Gigvs7NBdEumNWnIbgk0Z+1UHrYY5nDDGTCfgzGzhJWnkgHwBLEh 1f9zppi4P+MkNULB8ZNi7hnqPuR3fIOZVvXlCTMmj7vtD3Ggscig9MvgyMAQjaqahWgs 9SBXJXRT2VN9OD1bYcu3BtSPQ8gzx8Yhx3Vua9pjLEkXmcQpw3YdjtyQGVPB31I2QMrO WlbrLeJzCgMf0BGcW6SAuVgEtIj2tUGtTbV+PuutoK7a07LUHRqrwudxildkGizBalpJ 5aAg== 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; bh=WtwaLuEmGz2yNPjRTmxzhujSTXwd6dANkCO5wqXe344=; b=K05ymfVkogFcMqv58zDJxHwKmM651iocSbFqbj3e6r/g5N1VYLiJQqHz+AUhvb7fT/ dZCVmkhIMbkNEQjLgiq0BuX0DwilQfhqSZ33unRiAOuFGkAU4TvVM1m6zVtLsFZ3W6By iRitWoS1lyebUXYSLSaKaagNxOdWBRJBdYCg5tQOle5+d59O6BB6vHSBrj4Y/YBK00yv GsT2yvtaIN3Vr1UktSblvZZiNgfiYttssglB/HbvT+w0+XlhhMJJoeAQKQGMq1WM7GDA ++8pmEKriX3RVOtJLOkZuUbyD276d5ivI9vdrUILUNYX8u3wPL06sta+s0glYvy8A+l8 7mIg== X-Gm-Message-State: AHQUAuYaCmHBHbEm8HQHevEhj35rTeOmDYqGzE3JgW19y39usKa7ffC6 eaiLqrYeRTxImN62AZyuQsbCJa2thUdCdg== X-Google-Smtp-Source: AHgI3IZ5XNpQErADNrmiMZgRFUZ3s9jV35CO+FdFK8/xIRR+ez/Kezvci69z1cUYwbpBadPsoAQrdw== X-Received: by 2002:adf:9004:: with SMTP id h4mr216204wrh.121.1549450425023; Wed, 06 Feb 2019 02:53:45 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 6 Feb 2019 10:53:35 +0000 Message-Id: <20190206105337.11559-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190206105337.11559-1-richard.henderson@linaro.org> References: <20190206105337.11559-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42e Subject: [Qemu-devel] [PULL 1/3] target/hppa: use tb_cflags() to access tb->cflags X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, "Emilio G. Cota" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Message-Id: <1518663946-2326-1-git-send-email-cota@braap.org> Signed-off-by: Richard Henderson --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index ce05d5619d..51bfd9849d 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2059,7 +2059,7 @@ static DisasJumpType trans_mfctl(DisasContext *ctx, u= int32_t insn, /* FIXME: Respect PSW_S bit. */ nullify_over(ctx); tmp =3D dest_gpr(ctx, rt); - if (ctx->base.tb->cflags & CF_USE_ICOUNT) { + if (tb_cflags(ctx->base.tb) & CF_USE_ICOUNT) { gen_io_start(); gen_helper_read_interval_timer(tmp); gen_io_end(); --=20 2.17.2 From nobody Thu May 2 19:33:26 2024 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=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549450657318233.05219053011; Wed, 6 Feb 2019 02:57:37 -0800 (PST) Received: from localhost ([127.0.0.1]:48475 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grKtX-0006A1-Cg for importer@patchew.org; Wed, 06 Feb 2019 05:57:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grKpw-0003lA-TN for qemu-devel@nongnu.org; Wed, 06 Feb 2019 05:53:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grKpv-00007A-Rw for qemu-devel@nongnu.org; Wed, 06 Feb 2019 05:53:48 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:55695) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grKpv-00006Q-JP for qemu-devel@nongnu.org; Wed, 06 Feb 2019 05:53:47 -0500 Received: by mail-wm1-x329.google.com with SMTP id y139so1940714wmc.5 for ; Wed, 06 Feb 2019 02:53:47 -0800 (PST) Received: from cloudburst.twiddle.net.com ([212.187.182.166]) by smtp.gmail.com with ESMTPSA id v4sm16421568wme.6.2019.02.06.02.53.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Feb 2019 02:53:45 -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; bh=+2ZR7pJjVu+wDUuKYuXDSSog3LSprHkUzhreizPUI7s=; b=ogOxqACJSNSYfaeIkSoYR7WOsxKmynjySPtU+eN4a5jqdaBVTO6MKgytHKOlj+96Ji QW3Z0lUvid4Nq4gj9VjssDmZD4YyB4357IsCJ6RhhCJymSHtrOYS4VNtBwQK4tUfs84V CvAr7Z0fHp+Kx+Bu5T8rLDITn994XZ6s4f4gt2AEwAxUuPzuR3RvIeF+ALhYSlLMEfu0 dS5+14blC7YXq3XV2Yoqe0DnwZl41IKOpLTHtX8No9akERh4LJTOj5uHtPOjYPa0+81S DYhorGQGP7b1Y5+cCnU2TnMP0/JV9fpQzgjcKzLORP3S544tnETZ5RKJxB8zdPN5W01D QnGQ== 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; bh=+2ZR7pJjVu+wDUuKYuXDSSog3LSprHkUzhreizPUI7s=; b=s8B41HpBRb7wAzrwN1VIe+0wlW78AKvxZ3Ix34mUYuMcZLZRHraLDSltpqDYQQbhue 9MrC6vl6lPpy/cxPfZ8UmOUQGSLEMuEt6asZ3FUGvCmRRxsYDBIMjz1pKdOuZ/6rD3y0 nejIkf8C3q5GRzJrQDAXGekwG5sSGne8Ns/Ki9pCtubew7jrcTqeIsR7Lrjrorvv/r25 G/EaVomzNB9dvBdfKJz8kxlWhAdUx8SE9FUcTwQXnszC6D63fDZISEbjdwk4ylUlz+pB 3tNX18ARfzKj9nRitzQ7MVQNxrxRIXVDd4hsjvYmtJTiXX9rUtLAkfIcoM0zHIrAxIgt znJg== X-Gm-Message-State: AHQUAubk3tJGwNg2vPFky3FwncoEIwf1P0f1dfwz8AoQAE6p4347BPDO pl4muEJYJdR8vn0YwkORqmVsg2wiC+5rig== X-Google-Smtp-Source: AHgI3Ia85rDbKgEZ+fGFrhnjUcTKdsIt0CQ4127GQWFeACy+oJokkC3cr6FaQ9gQbCLzT30rDnkaoA== X-Received: by 2002:a1c:4108:: with SMTP id o8mr2568979wma.91.1549450426218; Wed, 06 Feb 2019 02:53:46 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 6 Feb 2019 10:53:36 +0000 Message-Id: <20190206105337.11559-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190206105337.11559-1-richard.henderson@linaro.org> References: <20190206105337.11559-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::329 Subject: [Qemu-devel] [PULL 2/3] target/hppa: fix setting registers via gdb X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Sven Schnelle Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Sven Schnelle While doing 'set $pcoqh=3D0xf0000000' i triggered the assertion below. The argument order for deposit64() is wrong, and val needs to be moved to the end. Signed-off-by: Sven Schnelle Message-Id: <20190128165333.3814-1-svens@stackframe.org> Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- target/hppa/gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/gdbstub.c b/target/hppa/gdbstub.c index e2e9c4d77f..3157a690f2 100644 --- a/target/hppa/gdbstub.c +++ b/target/hppa/gdbstub.c @@ -266,7 +266,7 @@ int hppa_cpu_gdb_write_register(CPUState *cs, uint8_t *= mem_buf, int n) case 65 ... 127: { uint64_t *fr =3D &env->fr[(n - 64) / 2]; - *fr =3D deposit64(*fr, val, (n & 1 ? 0 : 32), 32); + *fr =3D deposit64(*fr, (n & 1 ? 0 : 32), 32, val); } break; default: --=20 2.17.2 From nobody Thu May 2 19:33:26 2024 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=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549450510289240.13905259842227; Wed, 6 Feb 2019 02:55:10 -0800 (PST) Received: from localhost ([127.0.0.1]:48425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grKrA-0004WB-Ax for importer@patchew.org; Wed, 06 Feb 2019 05:55:04 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grKpx-0003mL-OY for qemu-devel@nongnu.org; Wed, 06 Feb 2019 05:53:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grKpx-00009E-1u for qemu-devel@nongnu.org; Wed, 06 Feb 2019 05:53:49 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:44736) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grKpw-00007I-Rq for qemu-devel@nongnu.org; Wed, 06 Feb 2019 05:53:48 -0500 Received: by mail-wr1-x42f.google.com with SMTP id v16so5134663wrn.11 for ; Wed, 06 Feb 2019 02:53:48 -0800 (PST) Received: from cloudburst.twiddle.net.com ([212.187.182.166]) by smtp.gmail.com with ESMTPSA id v4sm16421568wme.6.2019.02.06.02.53.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Feb 2019 02:53:46 -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; bh=uUVVSrOIsw7s88Otw6RQtbHLpqZarBDmGu7sNDA6noM=; b=KUuAIJMS59olenRG8JiQpXnumR2uVUmvpRsLCKvHMi5NfXJhkdvwp9CtVNTFXjB2WK Z8tgW/I5KDfR+rUHNTBiq5kLe97krMxR6vc0UiVOUBFW5eQ1UycKu+c7Nr4SVpR/My34 BSk5u8KSvNjuLRdXZZmpekyHsqNYnvNgiSmipI8Hg3BgWB3KYptp8eSbOnVVx5KT+Zkv CRgb3VAcApLrCCsZqnXkymUKQwPHORCgLaMSCqBjuuligsMrYSX0U1lpn3IGfmONZSm4 z6OTBsmKHkrnYGmozMaNHKUSvzVydUYg6fO/DDqE8iEWQsJuN2u1fZYlGup41nDW2bFE gQig== 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; bh=uUVVSrOIsw7s88Otw6RQtbHLpqZarBDmGu7sNDA6noM=; b=HA/y1sg4vs4uBnr3lzS+TRffuXwN9s+NjAadSA8YbYdYJlMYnyM+z3JXhtX8D/YsRu FCGcB7+DB0ZqCXYrxkv5FWA2VEXTlm2L29hNYxJVUXGcIIV2Ef+mX3fMrZPajYeEv53+ 7f6/B91eJl9ZGnbcLyyLl5lyQsrjE+F7NSPw4hTFtULyft9TuLuDzbyMMa8OduX4B8BV JkhnwGB0/piOtv5FwAYjZoWEQQuEA9tgGziMvh+J8x36KgD/DytGrBYGzwrVlB5mwro+ pndZb3bQx4mEwEMIZA5zqb4fPEMvG0Fg1doFx9GX0FZCscA89su/pMoMiZ3a2SJXRHWt du4w== X-Gm-Message-State: AHQUAuZtJYO/GfS6wxqFpXkZMloziVXgqYZsNdH4Hxd1PeXTARPx0un9 6YuIOSxvDH/89XhXlnnaiI2kVCfmZkzgfQ== X-Google-Smtp-Source: AHgI3IYOpjz6/NVK40srjY6QvSJxIcFdTY7iBo+YYnDunNe2eVWQ2uWzIDEZfQ76nOS2Qg1zwXr67w== X-Received: by 2002:a5d:4d46:: with SMTP id a6mr7576434wru.28.1549450427246; Wed, 06 Feb 2019 02:53:47 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 6 Feb 2019 10:53:37 +0000 Message-Id: <20190206105337.11559-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190206105337.11559-1-richard.henderson@linaro.org> References: <20190206105337.11559-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42f Subject: [Qemu-devel] [PULL 3/3] target/hppa: fix PSW Q bit behaviour to match hardware X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Sven Schnelle Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Sven Schnelle PA-RISC specification says: "Setting the PSW Q-bit, PSW{28}, to 1 with this instruction, if it was not already 1, is an undefined operation." However, at least HP-UX 10.20 sets the Q bit from 0 to 1 with the SSM instruction. Tested this both on HP9000/712 and HP9000/785/C3750, both machines set the Q bit from 0 to 1 without exception. This makes HP-UX 10.20 progress a little bit further. Signed-off-by: Sven Schnelle Message-Id: <20190129191402.29539-1-svens@stackframe.org> [rth: Add a comment to the code as well.] Signed-off-by: Richard Henderson --- target/hppa/op_helper.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/target/hppa/op_helper.c b/target/hppa/op_helper.c index 912e8d5be4..6bf478e7b0 100644 --- a/target/hppa/op_helper.c +++ b/target/hppa/op_helper.c @@ -665,11 +665,15 @@ void HELPER(reset)(CPUHPPAState *env) target_ureg HELPER(swap_system_mask)(CPUHPPAState *env, target_ureg nsm) { target_ulong psw =3D env->psw; - /* ??? On second reading this condition simply seems - to be undefined rather than a diagnosed trap. */ - if (nsm & ~psw & PSW_Q) { - hppa_dynamic_excp(env, EXCP_ILL, GETPC()); - } + /* + * Setting the PSW Q bit to 1, if it was not already 1, is an + * undefined operation. + * + * However, HP-UX 10.20 does this with the SSM instruction. + * Tested this on HP9000/712 and HP9000/785/C3750 and both + * machines set the Q bit from 0 to 1 without an exception, + * so let this go without comment. + */ env->psw =3D (psw & ~PSW_SM) | (nsm & PSW_SM); return psw & PSW_SM; } --=20 2.17.2