From nobody Tue Feb 10 16:21:32 2026 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 155240896112257.2785458273014; Tue, 12 Mar 2019 09:42:41 -0700 (PDT) Received: from localhost ([127.0.0.1]:55623 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3kU8-0000IN-QL for importer@patchew.org; Tue, 12 Mar 2019 12:42:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3k7W-0005vf-W6 for qemu-devel@nongnu.org; Tue, 12 Mar 2019 12:19:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3k7V-0003rh-I8 for qemu-devel@nongnu.org; Tue, 12 Mar 2019 12:19:14 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:46173) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3k7V-0003qb-4a for qemu-devel@nongnu.org; Tue, 12 Mar 2019 12:19:13 -0400 Received: by mail-pf1-x436.google.com with SMTP id s23so2151939pfe.13 for ; Tue, 12 Mar 2019 09:19:11 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-188-82.tukw.qwest.net. [97.113.188.82]) by smtp.gmail.com with ESMTPSA id q62sm12605644pga.32.2019.03.12.09.19.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2019 09:19:09 -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:in-reply-to:references; bh=lgmFLWb2AoBtsnhfwAW1Z+5LTMVI/a7+ZtnRExYBsYY=; b=yncss9S0IjsjLgykvQKaveLciaoYw1AHk9ISDV7jIdwjVjbcG0K485DRVToFQYFW+I 7yxzomihx9W0gA/0e5cdScqpo53bgF6rIL96TgQhqAaVlVDJIDNtCmud5u87lNAVO439 QgeM9663G4tJjq5XQVEa3ThkReIjwWBjrzuDGxWoWLr0qGPOShYUATi9uu1YV1KWrm/H MC1hcVPQPQV3seYBFu+X8/oEtfxUekvEcr/nM1fUo3279mp4hJELZK5dzZ4U516QxL/e 79z/ceUc+m2rrTicPwgnMQKSWDrB/V3jYjxQFATIqCSZCc1Y9lq0aw24pfqJ4xKea3v5 CTJQ== 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=lgmFLWb2AoBtsnhfwAW1Z+5LTMVI/a7+ZtnRExYBsYY=; b=m29kyVoR7FUyp3sSoeKK3WSCfeW00OlG8O3z7FL+xnh2r4Gj0+YLqLZi63AjUnrjI2 9OVWdUCEh77f+K3W58xZKDcF+pWM2avE5PbqvwJzhT9D6DAVA2PgP1nl6JQqskTrutz4 p93ro0sF9mW0B/Oj7ctVqVtlUHP2NVv70svjSqpRmF9rwDkImju5cC1IO+SJxn180Oqf qupf7taGnVLSofa+uTHCmxWO6qc4WSuqPsEMRc/qIv6qpxQUJ1BhB8blelgbeiIBWJP4 Do9pH5ArqEqdqqW0+DASaZZcrlFekm5kaZKxZVwO1T0P9SHj7KeEEM5batPeOF2xejlH vCMQ== X-Gm-Message-State: APjAAAWA4u3dBp5Nrze7OM0dtW+17tUftx6QLYxoMoQCFhyfUoQMAibq UMjI6S7K1yTEgFPdT/5UpX+DUZBhIN4= X-Google-Smtp-Source: APXvYqxosuu38j/n808nxF3oAZpSlcigENGu7Jwk2yMzssN+VtllTMFZTonBRIsUYjbjEtVTSyPtxw== X-Received: by 2002:a63:3d0e:: with SMTP id k14mr18293294pga.302.1552407550511; Tue, 12 Mar 2019 09:19:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 12 Mar 2019 09:18:55 -0700 Message-Id: <20190312161904.31130-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190312161904.31130-1-richard.henderson@linaro.org> References: <20190312161904.31130-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::436 Subject: [Qemu-devel] [PULL 02/11] target/hppa: fix overwriting source reg in addb 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 When one of the source registers is the same as the destination register, the source register gets overwritten with the destionation value before do_add_sv() is called, which leads to unexpection condition matches. Signed-off-by: Sven Schnelle Message-Id: <20190311191602.25796-2-svens@stackframe.org> Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- target/hppa/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 6c815e05c2..c4815d7e1a 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -3031,7 +3031,7 @@ static bool do_addb(DisasContext *ctx, unsigned r, TC= Gv_reg in1, DisasCond cond; =20 in2 =3D load_gpr(ctx, r); - dest =3D dest_gpr(ctx, r); + dest =3D tcg_temp_new(); sv =3D NULL; cb_msb =3D NULL; =20 @@ -3047,6 +3047,8 @@ static bool do_addb(DisasContext *ctx, unsigned r, TC= Gv_reg in1, } =20 cond =3D do_cond(c * 2 + f, dest, cb_msb, sv); + save_gpr(ctx, r, dest); + tcg_temp_free(dest); return do_cbranch(ctx, disp, n, &cond); } =20 --=20 2.17.2