From nobody Sun Nov 24 08:57:36 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=1725903095; cv=none; d=zohomail.com; s=zohoarc; b=Dj8QHMDq1Gywdee7higspL2pkGBiFKC5v8BQv4HTeRfM4l1JQulNMLyOnkoeOuelSzPW18Q1kHdKm9HE91r4fX0skmk1hWIh7HOfSOvABcFX30q3zNJmeQzQV1iepYxx2qlnVxApwSwzjZfPmWB2P64KwvlRnh+PZJqw+/DnyjA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725903095; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lpkHGNCwIxJL+Ub/QiAiuLzqpRZVFPeNdY4siUkENhs=; b=T/ZigRU/2rUMU9UoPev/pM2KEcDfbDPUvJy6Tfa5+tkX/h/ORBa+PZonWqTKsO8H57yQzmGbodSlr6FBCPt20WQVPqkyW2cM8aB584Z+EpdoEGEmkYONk+bLhfBAym2NQzCHznsbIG2IFE8YUPpoH/3Nl8EoUqMaaBEWThjEUHc= 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 1725903095907439.88318015246944; Mon, 9 Sep 2024 10:31:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sniC2-000568-GE; Mon, 09 Sep 2024 13:28:50 -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 1sniBt-0004Wg-19 for qemu-devel@nongnu.org; Mon, 09 Sep 2024 13:28:41 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sniBr-00062X-BJ for qemu-devel@nongnu.org; Mon, 09 Sep 2024 13:28:40 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-2053525bd90so39040705ad.0 for ; Mon, 09 Sep 2024 10:28:38 -0700 (PDT) Received: from stoup.. (174-21-81-121.tukw.qwest.net. [174.21.81.121]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20710e11e02sm36539875ad.14.2024.09.09.10.28.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2024 10:28:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725902918; x=1726507718; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lpkHGNCwIxJL+Ub/QiAiuLzqpRZVFPeNdY4siUkENhs=; b=j4hb8TAi9+bJigYJk00fNg4f6+y4T3Fh5UPrc20BiT3KqcHhGKGDeZg5EidgKyiuVZ JmSYJHH+lBx+llt3BtvE72VMHjUywj0i21IGy4NhGMrMqVJJefChswvqGSEzfo7h4lGU MZsFCvT1aLKrUTz6596YkOZdzK/by8b4E0PChwCL3KHRbFTiEauK09nFsmigLxCvJIVG xRtUB714vCeGG/ZMIMlRYbM/IIIN0qvQJlqvwkqz42pyQ3dxfg0Y/7Vm0PdkHPIkC+/P 99gb2xnGQ4+D0Rz97QKHX99B6Vt70vcnNwp/+hRCWxH2BiPFH5dbeNOqrhkdNHCgeuI7 OddA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725902918; x=1726507718; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lpkHGNCwIxJL+Ub/QiAiuLzqpRZVFPeNdY4siUkENhs=; b=Yasq7uoY8QJnMGR6xKvbKwQDQhNH6RwWgPiqUNMs2MClUQ1IyWKXuamrjhBag8EbDe uaXFN5ZkdNPjg8snMxpR2sDtWTCc/AqGcSVWCyCp8DLs3rGtRmrlufWkOXWzkCUoXm0r S/5RrnpgVY/t07amKBZWtgwmhiFeTiBKHFxVyTMbQOyQfPSGjohHJnozR4UPwO//4IS4 xqo/aXczZ3HRMyFkwIwXss4fh/ssorozHath8LCQnTqMwtvGVUTQahP1bL64L8WQsdmg mCQPERDf6SCL1lI4ry5Eh/Ov4Uuiian8xkyTeyKHpos1uCTa0//xME9MAI0pk1hJl1pr yZHg== X-Gm-Message-State: AOJu0Yy7pfURkexHGaOJLen0sQ1U7t4HhnUO4EmYDYPpvAXGRROQUEMo TJ4giU74OnPRYjh0ORFNuDgo6yJitqy6LLZprJAHqTYBzyKrQ212o5Eiphw1Da77K+DP6hzS866 C X-Google-Smtp-Source: AGHT+IG6z4i3ZswPz9L/LasGNmG98wVEzGJZPUvqPvqotrUqrvJIdIjBExWA5qeH+XP+9Rpisi2uOQ== X-Received: by 2002:a17:902:f550:b0:206:b250:1e1 with SMTP id d9443c01a7336-206f05f6425mr143626225ad.45.1725902918039; Mon, 09 Sep 2024 10:28:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: laurent@vivier.eu, daniel@0x0f.com Subject: [PATCH v3 14/26] target/m68k: Remove env argument to gen_lea_indexed Date: Mon, 9 Sep 2024 10:28:11 -0700 Message-ID: <20240909172823.649837-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240909172823.649837-1-richard.henderson@linaro.org> References: <20240909172823.649837-1-richard.henderson@linaro.org> 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::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.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 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: 1725903097715116600 Content-Type: text/plain; charset="utf-8" Use the env pointer in DisasContext. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/m68k/translate.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 2c0852ac3a..78a9358416 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -391,7 +391,7 @@ static TCGv gen_addr_index(DisasContext *s, uint16_t ex= t, TCGv tmp) * Handle a base + index + displacement effective address. * A NULL_QREG base means pc-relative. */ -static TCGv gen_lea_indexed(CPUM68KState *env, DisasContext *s, TCGv base) +static TCGv gen_lea_indexed(DisasContext *s, TCGv base) { uint32_t offset; uint16_t ext; @@ -400,7 +400,7 @@ static TCGv gen_lea_indexed(CPUM68KState *env, DisasCon= text *s, TCGv base) uint32_t bd, od; =20 offset =3D s->pc; - ext =3D read_im16(env, s); + ext =3D read_im16(s->env, s); =20 if ((ext & 0x800) =3D=3D 0 && !m68k_feature(s->env, M68K_FEATURE_WORD_= INDEX)) return NULL_QREG; @@ -418,9 +418,9 @@ static TCGv gen_lea_indexed(CPUM68KState *env, DisasCon= text *s, TCGv base) if ((ext & 0x30) > 0x10) { /* base displacement */ if ((ext & 0x30) =3D=3D 0x20) { - bd =3D (int16_t)read_im16(env, s); + bd =3D (int16_t)read_im16(s->env, s); } else { - bd =3D read_im32(env, s); + bd =3D read_im32(s->env, s); } } else { bd =3D 0; @@ -466,9 +466,9 @@ static TCGv gen_lea_indexed(CPUM68KState *env, DisasCon= text *s, TCGv base) if ((ext & 3) > 1) { /* outer displacement */ if ((ext & 3) =3D=3D 2) { - od =3D (int16_t)read_im16(env, s); + od =3D (int16_t)read_im16(s->env, s); } else { - od =3D read_im32(env, s); + od =3D read_im32(s->env, s); } } else { od =3D 0; @@ -737,7 +737,7 @@ static TCGv gen_lea_mode(CPUM68KState *env, DisasContex= t *s, return addr; case 6: /* Indirect index + displacement. */ reg =3D get_areg(s, reg0); - return gen_lea_indexed(env, s, reg); + return gen_lea_indexed(s, reg); case 7: /* Other */ switch (reg0) { case 0: /* Absolute short. */ @@ -751,7 +751,7 @@ static TCGv gen_lea_mode(CPUM68KState *env, DisasContex= t *s, offset +=3D (int16_t)read_im16(env, s); break; case 3: /* pc index+displacement. */ - return gen_lea_indexed(env, s, NULL_QREG); + return gen_lea_indexed(s, NULL_QREG); case 4: /* Immediate. */ default: return NULL_QREG; --=20 2.43.0