From nobody Wed Nov 12 03:40:45 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=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 ARC-Seal: i=1; a=rsa-sha256; t=1568370148; cv=none; d=zoho.com; s=zohoarc; b=NqV3gL6yZVh3TZnsu9wKO/zA9lq/bZHDgVVjZiX5mOHxMdFmFx5hIkb0GFwKT4rhZfRnVh/z1qb0wOavye3fhZ3OSZG3HTB3oE6ZvUD9LDXKkJbaejTLRAufmHjStPvz+JPEYCdCv7v2+1gkDYtKuhwekLmFDXF4VVeRIL0IeXY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568370148; h=Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=T/vNNqU0upqf6XS8y3LAK1FXx4ffxM5S3CP1z6fMnmY=; b=JFKIh7pd5WIuq+rXBS+yGxUzJKQlaWFArggPf+qprOddS41L9k3rbnPTdYdgAAtoOON3zTcFnfBTGiUvwCtK24AcG2FsoKu0N2zwGtJQODZe+E8jYb7h7/vIDpSwxjX7DZ/efVCBqfx0Muw0E5/vzzwa1y/NT3GXqV0v/KLkw2Y= ARC-Authentication-Results: i=1; mx.zoho.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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1568370148108414.6978278775282; Fri, 13 Sep 2019 03:22:28 -0700 (PDT) Received: from localhost ([::1]:42090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8iig-0005hL-MZ for importer@patchew.org; Fri, 13 Sep 2019 06:22:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33476) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8idl-0001ub-IA for qemu-devel@nongnu.org; Fri, 13 Sep 2019 06:17:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i8idk-00017W-HI for qemu-devel@nongnu.org; Fri, 13 Sep 2019 06:17:21 -0400 Received: from smtp.duncanthrax.net ([2001:470:70c5:1111::170]:34320) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i8idk-00016Z-4r for qemu-devel@nongnu.org; Fri, 13 Sep 2019 06:17:20 -0400 Received: from hsi-kbw-046-005-233-221.hsi8.kabel-badenwuerttemberg.de ([46.5.233.221] helo=x280.stackframe.org) by smtp.eurescom.eu with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1i8idi-00076C-2H; Fri, 13 Sep 2019 12:17:18 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=duncanthrax.net; s=dkim; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=T/vNNqU0upqf6XS8y3LAK1FXx4ffxM5S3CP1z6fMnmY=; b=abXFPUv6TCqp3euC+Q4KkuEUp/ KunwgUXhS8IF6fMs5ownTLORWzMh+FwNDXm9nGPxf3KeyYQF4GkPi8Ts8qfAOXbrMD+oka/P5ECce T20WJwtgnRdklkgrci0HxDx3NBiBIuVut59sYz1hI9kWsZYjGX1zy2g2P36a8au6HmeE=; From: Sven Schnelle To: Richard Henderson Date: Fri, 13 Sep 2019 12:17:13 +0200 Message-Id: <20190913101714.29019-2-svens@stackframe.org> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20190913101714.29019-1-svens@stackframe.org> References: <20190913101714.29019-1-svens@stackframe.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: 2001:470:70c5:1111::170 Subject: [Qemu-devel] [PATCH 1/2] target/hppa: prevent trashing of temporary in trans_mtctl() 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: Helge Deller , Sven Schnelle , qemu-devel@nongnu.org, Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" nullify_over() calls brcond which destroys all temporaries. Signed-off-by: Sven Schnelle --- target/hppa/translate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 53e17d8963..b12525d535 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2214,10 +2214,11 @@ static bool trans_mtsp(DisasContext *ctx, arg_mtsp = *a) static bool trans_mtctl(DisasContext *ctx, arg_mtctl *a) { unsigned ctl =3D a->t; - TCGv_reg reg =3D load_gpr(ctx, a->r); + TCGv_reg reg; TCGv_reg tmp; =20 if (ctl =3D=3D CR_SAR) { + reg =3D load_gpr(ctx, a->r); tmp =3D tcg_temp_new(); tcg_gen_andi_reg(tmp, reg, TARGET_REGISTER_BITS - 1); save_or_nullify(ctx, cpu_sar, tmp); @@ -2232,6 +2233,8 @@ static bool trans_mtctl(DisasContext *ctx, arg_mtctl = *a) =20 #ifndef CONFIG_USER_ONLY nullify_over(ctx); + reg =3D load_gpr(ctx, a->r); + switch (ctl) { case CR_IT: gen_helper_write_interval_timer(cpu_env, reg); --=20 2.23.0.rc1 From nobody Wed Nov 12 03:40:45 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=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 ARC-Seal: i=1; a=rsa-sha256; t=1568370016; cv=none; d=zoho.com; s=zohoarc; b=meX1i+kRruHdIJMGFXLNsXjoQqXudZFbU0VN9gJphrNQREexEPnoBLJKwMbdYloXnCaFo+7sPWS9Z6WfVpY8fdhH3B3D9ahfwudW5Wy7v18lK5n76p7dE6e5Ze8cQnsd+L8Gs5pGU1AX4kLOgPC6lEj+xcTL6m6JvkHX8L+PPeE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568370016; h=Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=rLxnUY3AYptsanaaX1mTCGsmgfgbQ+joD3j3C+qK/Eo=; b=fEWvZqmicuOq40NlUe7sRkyQ25Sxr8aB7anrNwF8UW5BBro5vF4rKzZjhcO9dekvH9IK1EWkJf+N7tBTGNyW9YveYxezao1s/WX6FpM6kH+hVb2YjtP+nmv7bw6+jYWqGowCKM95wzAiw5mVUUDsRKF/50EP1oWcEu9WNA5keV8= ARC-Authentication-Results: i=1; mx.zoho.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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1568370016873658.0610776647313; Fri, 13 Sep 2019 03:20:16 -0700 (PDT) Received: from localhost ([::1]:42070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8igZ-0004TT-OR for importer@patchew.org; Fri, 13 Sep 2019 06:20:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33478) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8idl-0001ug-KH for qemu-devel@nongnu.org; Fri, 13 Sep 2019 06:17:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i8idk-00017b-Hc for qemu-devel@nongnu.org; Fri, 13 Sep 2019 06:17:21 -0400 Received: from smtp.duncanthrax.net ([2001:470:70c5:1111::170]:37433) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i8idk-00016c-4o for qemu-devel@nongnu.org; Fri, 13 Sep 2019 06:17:20 -0400 Received: from hsi-kbw-046-005-233-221.hsi8.kabel-badenwuerttemberg.de ([46.5.233.221] helo=x280.stackframe.org) by smtp.eurescom.eu with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1i8idi-00076C-9R; Fri, 13 Sep 2019 12:17:18 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=duncanthrax.net; s=dkim; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=rLxnUY3AYptsanaaX1mTCGsmgfgbQ+joD3j3C+qK/Eo=; b=e8aaEhebTI3lacJp0iah/odS41 ktX1O7fw74vtxLc286L1uN4cfPs1ziGI+gWvW1tjyLxiSwZeiY74Y5nI4T19YEGUJNa8GsvRe2Tpl k+8kSeqE8WnxaoOxeQkFIGUQiZqpiYCFo1vAkFvr/RYgqCWde6iauKEcT3/qwF3s/Z8o=; From: Sven Schnelle To: Richard Henderson Date: Fri, 13 Sep 2019 12:17:14 +0200 Message-Id: <20190913101714.29019-3-svens@stackframe.org> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20190913101714.29019-1-svens@stackframe.org> References: <20190913101714.29019-1-svens@stackframe.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: 2001:470:70c5:1111::170 Subject: [Qemu-devel] [PATCH 2/2] target/hppa: prevent trashing of temporary in do_depw_sar() 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: Helge Deller , Sven Schnelle , qemu-devel@nongnu.org, Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" nullify_over() calls brcond which destroys all temporaries. Signed-off-by: Sven Schnelle Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/hppa/translate.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index b12525d535..c1b2822f60 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -3404,10 +3404,6 @@ static bool do_depw_sar(DisasContext *ctx, unsigned = rt, unsigned c, TCGv_reg mask, tmp, shift, dest; unsigned msb =3D 1U << (len - 1); =20 - if (c) { - nullify_over(ctx); - } - dest =3D dest_gpr(ctx, rt); shift =3D tcg_temp_new(); tmp =3D tcg_temp_new(); @@ -3440,11 +3436,17 @@ static bool do_depw_sar(DisasContext *ctx, unsigned= rt, unsigned c, =20 static bool trans_depw_sar(DisasContext *ctx, arg_depw_sar *a) { + if (a->c) { + nullify_over(ctx); + } return do_depw_sar(ctx, a->t, a->c, a->nz, a->clen, load_gpr(ctx, a->r= )); } =20 static bool trans_depwi_sar(DisasContext *ctx, arg_depwi_sar *a) { + if (a->c) { + nullify_over(ctx); + } return do_depw_sar(ctx, a->t, a->c, a->nz, a->clen, load_const(ctx, a-= >i)); } =20 --=20 2.23.0.rc1