From nobody Sun Nov 24 11:06:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.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=1723507731; cv=none; d=zohomail.com; s=zohoarc; b=GbAZ/TUG+oxP0OoYmUEnW/L0HpRvQKeE2qV1GssD0/B3YfvxFXTnxoiU8A39AX4w0H815HcPHzNKJ86TwWtIiMLnUmDei0hnz9+3dgyGT3t0Fsb7M0/Gx0n3VtaZD1doln3zt8aUKSVV7aTvAoTLZQSgqAIRkJoCv2C/BzwmiE4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723507731; h=Content-Transfer-Encoding:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=157xaMoQ1wBHg5AP7mTAiNkrbkrM8xUbKEuFo0jGCag=; b=JujNKevmrbiG9GaYow++d3TXKiRHu4xyf7qZ1f7/qaL3rnHP/FwvDyY5hCxxJAKOOD88nS6ZoUOHAzwN7Srs/UGKFNvaK/D2kHfNg8Adjx8TmXDXTFwKg+WMkScpwgwMtWelQl5gCixw4uNmoNLwS1HIz1UXwKPKVtailqCOInQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17235077309481012.3955722687632; Mon, 12 Aug 2024 17:08:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdf4q-00028K-KH; Mon, 12 Aug 2024 20:07:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sdf4m-00027e-Cl for qemu-devel@nongnu.org; Mon, 12 Aug 2024 20:07:48 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sdf4j-0002zb-DB for qemu-devel@nongnu.org; Mon, 12 Aug 2024 20:07:48 -0400 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2cd5e3c27c5so3214418a91.3 for ; Mon, 12 Aug 2024 17:07:44 -0700 (PDT) Received: from stoup.. ([203.30.4.111]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d1c9c7ad59sm9055186a91.13.2024.08.12.17.07.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Aug 2024 17:07:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723507663; x=1724112463; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=157xaMoQ1wBHg5AP7mTAiNkrbkrM8xUbKEuFo0jGCag=; b=yqwYrGosr2rDd4kKFvOUmtM2btTIFbyLSm8mbvpQYnEuOPQss0hbtFoAN/o7iuSdCe 6cpUAWz9xSRqkC5mMqpkK9EJH2bZ25+2kNx0fAyMmwXepueX0sCxgrIzGRbRovln6xl3 0sYhhF8AF5HXgDWjTU/JhHTyVzjxnYHqczFgsiiOM2EfGwQGHcx05hgYrzT+5awMjh3q LhL9DLeLU5SYdWP762FAMBH9K6rUSKjevmFTA/45ISRkDw5IGr3crcNVbfJb+YsV3g8d OtRt8HiOAleHElR7tAbcqrJ1iJMl3eCUqmGUZ9mGE3dfy7i2xjvCQIektJx++jP3G3bV yp4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723507663; x=1724112463; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=157xaMoQ1wBHg5AP7mTAiNkrbkrM8xUbKEuFo0jGCag=; b=m/dOa/p44Z63yWoufNg3nIrQnzUGQzT+DebyTM9fp9goyfViInInw0xoKiIxSs+4wU TQwlqiEvvUG13gtv+o4usqH5y6/GmoMdK9pT55t7XoLK8tfYhk8/f0nqutSUR4HW+9nA 5N0mP1SLQW4soJ7JBJvmOZmuew7ULR2Q5IkrDUAmXZyNNW2SGrSOQxtsTla8boPfKgHc qT4n6PzgZqqBJLcmqdVZZ2d3JeG10wPhFlO/wbtS9jnbWK/esS6I11mKphuzLAyjrzcU F6ygr+S1QYPaaPQJC7MqHVYHI6Z+E3jw4jFAyZVekwG40BEaWFBSHgLUOcM0syDiHhNy GWAw== X-Gm-Message-State: AOJu0YwH2sNWZ8G9XjEkAey/eFLqtV1S0Vskby0v/SeCeaFRe09kLcBJ vbDNFliJnlmKjrWbQnyXa7yu2dZCktwmWxHwkq+hYUiBv8hGQxSn5ReOuMrp3lJvKEOPrmsnq3W FxOw= X-Google-Smtp-Source: AGHT+IEJBeQWkPKgXtzYFcHBOh1H38mMvLf9uwjK4c8Fc4YzlxUyBiaHLgxUmYHn8zqbitg5D2Knlg== X-Received: by 2002:a17:90a:4b0c:b0:2cd:b938:770b with SMTP id 98e67ed59e1d1-2d3924e0bdemr2033227a91.5.1723507663297; Mon, 12 Aug 2024 17:07:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-9.1] target/m68k: Always return a temporary from gen_lea_mode Date: Tue, 13 Aug 2024 10:07:37 +1000 Message-ID: <20240813000737.228470-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1723507733822116600 Content-Type: text/plain; charset="utf-8" Returning a raw areg does not preserve the value if the areg is subsequently modified. Fixes, e.g. "jsr (sp)", where the return address is pushed before the branch. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2483 Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/m68k/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index fb5ecce0c3..5e2be846b7 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -723,7 +723,9 @@ static TCGv gen_lea_mode(CPUM68KState *env, DisasContex= t *s, } /* fallthru */ case 2: /* Indirect register */ - return get_areg(s, reg0); + tmp =3D tcg_temp_new(); + tcg_gen_mov_i32(tmp, get_areg(s, reg0)); + return tmp; case 4: /* Indirect predecrememnt. */ if (opsize =3D=3D OS_UNSIZED) { return NULL_QREG; --=20 2.43.0