From patchwork Mon Sep 9 17:28:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 826637 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp2130986wrb; Mon, 9 Sep 2024 10:31:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX/bPXAzaMgBseVrKaXspX2i1L7DLIruTRY0YPiYDyjYS7l5m/HgRdc4PC+QqLxDuiMPSOiVw==@linaro.org X-Google-Smtp-Source: AGHT+IERiw/6bn242mN1doq5Zm9bMAaNrjLz3RL4ffKCa90WFGz+k3ptnh/XGC9NJV75T9VGzvSc X-Received: by 2002:a05:6102:3a13:b0:49c:92d:103f with SMTP id ada2fe7eead31-49c092d1710mr3371451137.26.1725903095634; Mon, 09 Sep 2024 10:31:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725903095; cv=none; d=google.com; s=arc-20240605; b=DFSyJUbnIYsxv6quyjlkxJFS/9HHYKCz8k5cjIAjtN9993wRbK6i4fCiknCamTgIUM zEbGxg2seot3ePNJ6s5L+M7XibYcaQZYNaPgozXnpfCATryWeFOnyVHwDg4rWYaWZU1x VHueI9PwWb/AQn9bVGfnI9MQQOt4lGVmv6zCmKDhYpMygN1NQGN8n2QxZBryy/MMHD5/ +4MXPA68pcn0QCcvKtf4dQHu/ssY0t5K7AlK3LOQkwUgyaV+8Cl+kaEzKtThPa+vyWxE JcxXTODmCspElkS2nheGvSYZekIe5liW/CJK6SEp7E9SdF1wgZosqP1/CVpHKlWuG9Ze m0ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lpkHGNCwIxJL+Ub/QiAiuLzqpRZVFPeNdY4siUkENhs=; fh=4bMsMJJHDmTQNFavmZaD/iTPOPK/LdH9YFdHoY+StpE=; b=LYrlC35rKhIid8rkj15C5RsSHd08ShlfJis0iCcOlg9vJkTG6IiAIlehfYdLftxar9 UKgUhahI4P6wcpTauR9740gjAEhIWfcD6RnCn/IF/1Kr+8mKoiVG6muxpLy1xT4oL6/A wFrKLKrnz/LzRGT8I3cNepSqqaKjGmVsLGLUCKp7jfF9iiXF+Mx2MQERM88hOFzOh6bV WCFicRpD+nNPECM/UP4zAKQn2N69ECuoMBiGdg29toK9EYYssXdVUdA7pL45YGgcJ+ro IBoLh9mgy0R3pEQ2nhLE+e0r2gsYdmnBCWemtWGWfHfJZZSK0hSGf6DzZ+4IPKKzgEns cK6w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j4hb8TAi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-49bf09ad6a6si989082137.65.2024.09.09.10.31.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Sep 2024 10:31:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j4hb8TAi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) 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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Use the env pointer in DisasContext. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- 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 ext, 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, DisasContext *s, TCGv base) uint32_t bd, od; offset = s->pc; - ext = read_im16(env, s); + ext = read_im16(s->env, s); if ((ext & 0x800) == 0 && !m68k_feature(s->env, M68K_FEATURE_WORD_INDEX)) return NULL_QREG; @@ -418,9 +418,9 @@ static TCGv gen_lea_indexed(CPUM68KState *env, DisasContext *s, TCGv base) if ((ext & 0x30) > 0x10) { /* base displacement */ if ((ext & 0x30) == 0x20) { - bd = (int16_t)read_im16(env, s); + bd = (int16_t)read_im16(s->env, s); } else { - bd = read_im32(env, s); + bd = read_im32(s->env, s); } } else { bd = 0; @@ -466,9 +466,9 @@ static TCGv gen_lea_indexed(CPUM68KState *env, DisasContext *s, TCGv base) if ((ext & 3) > 1) { /* outer displacement */ if ((ext & 3) == 2) { - od = (int16_t)read_im16(env, s); + od = (int16_t)read_im16(s->env, s); } else { - od = read_im32(env, s); + od = read_im32(s->env, s); } } else { od = 0; @@ -737,7 +737,7 @@ static TCGv gen_lea_mode(CPUM68KState *env, DisasContext *s, return addr; case 6: /* Indirect index + displacement. */ reg = 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, DisasContext *s, offset += (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;