From nobody Mon Nov 25 09:32:31 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1716506562; cv=none; d=zohomail.com; s=zohoarc; b=gZUgaerMQtwix8EhAg7uw4JOHPv9+DOUsriTuFQO+Q5upS0/USEtu/YW/3aYghBpboSr8jOqth0sKKxeYa70p6F2y3ZXq73OqHH2B3O80ZSLkKM9goXPTOV0POt01N9HYe73CT1Pu3ZwjSOI7UK1UJVwQiHX0Uk3qD8aP0XQlfk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716506562; 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=wqUaQGSgYMin+3lQdQKQjhzEKnE4NEk8qBGjnn1PYKA=; b=apgiN2KtknG3QW6Cn1rx0/AVBB8z2uOTWCeb0fFWhHhRNlE0vBol12F5cc6UK8MVHh5S9a2VWUU5FkVz2EslfjUDkZZyOrUDUTEvnjpdf2wLmHLlUzjd/ZsfGlKankZO8TwXXp+Ovo4D5DlyOVOIQFLF41nHpSzG1ChKlmeLlpM= 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 1716506562687190.06708547713913; Thu, 23 May 2024 16:22:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAHZH-0001Q1-Co; Thu, 23 May 2024 19:09:51 -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 1sAHZ7-0000RF-4d; Thu, 23 May 2024 19:09:43 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAHYx-0005oD-HR; Thu, 23 May 2024 19:09:40 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-6f8e819a540so346324b3a.0; Thu, 23 May 2024 16:09:25 -0700 (PDT) Received: from wheely.local0.net (110-175-65-7.tpgi.com.au. [110.175.65.7]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-682227f1838sm87041a12.46.2024.05.23.16.09.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 16:09:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716505763; x=1717110563; 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=wqUaQGSgYMin+3lQdQKQjhzEKnE4NEk8qBGjnn1PYKA=; b=Iek1cShXx8fQWZyva8d7PXuwpImVm1S9YRy7dwyNufzgVSWvpdFUZ6A3dU5gDN2trO ENdeDmsVMnlEXITDSCEEPzsXs5+IJbDQdll9NarlCJkBVrGcM0DvQv/tS3ATFZq0H90+ 4TZ6YQVbxPeisW8wLSq9+zPrijaZVcfgCtPAU/Tbp+S6hDvx7rsWfHxapW+hvNAJFzhD LTBP7EfKZWcCLLnbUnlDFB/MK7w/OtBjtbibU2CLi2FF3N/fwWyL2GAEG8Ymv3cwmK0S sRzFThi/12Nd6FUVGcjrKedpx6Ycp/U3bksFdlpyAF8cRe7q8BKdm75T5xyFNuq07g4h a7fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716505763; x=1717110563; 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=wqUaQGSgYMin+3lQdQKQjhzEKnE4NEk8qBGjnn1PYKA=; b=Ps1NK7xJuQu93BGbg6ebLDrv8SplDGFxAVZEclBepyh/lsoGAwFC0h4sexdKqkJ4Jg zxIspXN4yflsuDSMic9+sW9VvHOCxXWMo6oQCI1U4wgDf2+qldki4/Wtoo8ZiYfwpRn7 N9jDnLa0xrvX3/gmuP6ldXyf48bSSfS0E204MpA820g5ekE5z/XeIIU9eaP6ws42evAa lbG/QqgrX+jAtY/dPCoyz0pnCWUlk8kClohu+tEiKLQxuCs48vL2bupxYZ5j16P59cWx clMDkOae3f43bxSP+k9nS9DxFtreR3dnuXV72ZM0pE4r1rinbEQzQntrN3ZLLHEhKgaa p/DQ== X-Forwarded-Encrypted: i=1; AJvYcCVrF5lWFepCpR27O+FNxNIiShqfeCQ8Scmefg4Oxxxy9FChNH0Ji5Ajeqhs7OK6MrIfRKCN0+SfEhmdpWsNNSzAPRD7 X-Gm-Message-State: AOJu0YyoJ1NsBG5ZK0bBWarwCqRUO040QN8HqOa83i1E9HlCGzX3X6z9 rYS5wg4XhVSKw7wklVGOzKjS2eM7e+ArFugidmYZHA9aZV8WzCHVP3gxKA== X-Google-Smtp-Source: AGHT+IFDzZkKj+s0I/96qv3ijwwOjdAXP3lWyEr4ZKFH45atYFLnrpUpo6MLvXzxJCdmPMqFW9ntuA== X-Received: by 2002:a05:6a21:1f28:b0:1a3:e2c4:956e with SMTP id adf61e73a8af0-1b212d1d3c4mr839170637.25.1716505762969; Thu, 23 May 2024 16:09:22 -0700 (PDT) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , qemu-ppc@nongnu.org, BALATON Zoltan , Richard Henderson Subject: [PULL 27/72] target/ppc: Remove redundant MEMOP_GET_SIZE macro Date: Fri, 24 May 2024 09:07:00 +1000 Message-ID: <20240523230747.45703-28-npiggin@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523230747.45703-1-npiggin@gmail.com> References: <20240523230747.45703-1-npiggin@gmail.com> 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::42d; envelope-from=npiggin@gmail.com; helo=mail-pf1-x42d.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=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 @gmail.com) X-ZM-MESSAGEID: 1716506563502100001 Content-Type: text/plain; charset="utf-8" There is a memop_size() function for this. Reviewed-by: BALATON Zoltan Reviewed-by: Richard Henderson Signed-off-by: Nicholas Piggin --- target/ppc/translate.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 6c103dafe0..cf42dfcc9d 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -2840,8 +2840,6 @@ static void gen_isync(DisasContext *ctx) ctx->base.is_jmp =3D DISAS_EXIT_UPDATE; } =20 -#define MEMOP_GET_SIZE(x) (1 << ((x) & MO_SIZE)) - static void gen_load_locked(DisasContext *ctx, MemOp memop) { TCGv gpr =3D cpu_gpr[rD(ctx->opcode)]; @@ -2874,7 +2872,7 @@ static void gen_fetch_inc_conditional(DisasContext *c= tx, MemOp memop, TCGv u =3D tcg_temp_new(); =20 tcg_gen_qemu_ld_tl(t, EA, ctx->mem_idx, memop); - tcg_gen_addi_tl(t2, EA, MEMOP_GET_SIZE(memop)); + tcg_gen_addi_tl(t2, EA, memop_size(memop)); tcg_gen_qemu_ld_tl(t2, t2, ctx->mem_idx, memop); tcg_gen_addi_tl(u, t, addend); =20 @@ -2884,7 +2882,7 @@ static void gen_fetch_inc_conditional(DisasContext *c= tx, MemOp memop, tcg_gen_qemu_st_tl(u, EA, ctx->mem_idx, memop); =20 /* RT =3D (t !=3D t2 ? t : u =3D 1<<(s*8-1)) */ - tcg_gen_movi_tl(u, 1 << (MEMOP_GET_SIZE(memop) * 8 - 1)); + tcg_gen_movi_tl(u, 1 << (memop_size(memop) * 8 - 1)); tcg_gen_movcond_tl(cond, cpu_gpr[rD(ctx->opcode)], t, t2, t, u); } =20 @@ -3046,7 +3044,7 @@ static void gen_st_atomic(DisasContext *ctx, MemOp me= mop) TCGv ea_plus_s =3D tcg_temp_new(); =20 tcg_gen_qemu_ld_tl(t, EA, ctx->mem_idx, memop); - tcg_gen_addi_tl(ea_plus_s, EA, MEMOP_GET_SIZE(memop)); + tcg_gen_addi_tl(ea_plus_s, EA, memop_size(memop)); tcg_gen_qemu_ld_tl(t2, ea_plus_s, ctx->mem_idx, memop); tcg_gen_movcond_tl(TCG_COND_EQ, s, t, t2, src, t); tcg_gen_movcond_tl(TCG_COND_EQ, s2, t, t2, src, t2); --=20 2.43.0