From nobody Mon Nov 25 10:18:09 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=1716506512; cv=none; d=zohomail.com; s=zohoarc; b=JddgWZCa8QOQvLXw7f9HPg1ImydXz9vhSJWKrRk7vLOp+QJ9JTSZbMHlNsxmBLfov77RNqP7Mfxs6BdsLxEaUh3+wqGCmrzLL83RjvpSCDYvN+KWQQ83X9PaGcb6ArMV+LalAMfyboHTyDGfjDeuYoQsuLiAT+dHSndB9YeRC2k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716506512; 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=UkWMu8dLgBQslrOlCwfLt/yP6TjinsGZIeno/YYDSKI=; b=jZDRirzILLLONINmol8q72JjT04LcilqYKxf6wH6f3xoF0jkE8+9NL0xf4loodsHGggCdgF5OQOm7WEnLWDDkGZeMmsk5oYCIuGZidYqhjeq+B2vZTQ8UTQhMGQ709g4j9bRZMi5Ck2/80IFCNvJlD/0Tttsf8nc+DoEsbup0r4= 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 1716506512118890.8092322134285; Thu, 23 May 2024 16:21:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAHZE-00013K-5N; Thu, 23 May 2024 19:09:48 -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 1sAHYt-0000Fr-VQ; Thu, 23 May 2024 19:09:34 -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 1sAHYp-0005nw-1K; Thu, 23 May 2024 19:09:25 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1f3310a21d8so16155345ad.1; Thu, 23 May 2024 16:09:21 -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.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 16:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716505760; x=1717110560; 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=UkWMu8dLgBQslrOlCwfLt/yP6TjinsGZIeno/YYDSKI=; b=l5YS4DYAEPitLbttlRjl3CO/y8KKDj/+DvtZWI6Yp1VXBxFqEuBQrXzD/ddtnL1W1u FgEH4sBwv65xFQ+btkoN8okO7G+jDdCm4f/bNmzH7+peBrjWqTIgP9NFiVGSXu1YFQ2H HXKBhQxIBFez0tF3xLO5/WjPgfdpnjQPI2rBR1oEZNjsRY6lPQ5rcRlaiLtQ9jomvQZR ScijWw9rA6LKmFg3XgZjYzRRq6e29L7O+OOgPou9YbmyFsNv/m5qaFGDu/XypxChr4DQ drHtaqsYz3V/jw0m1sk5mLJTIub8VHL5ltIR0xjY3XfmaK6sjMhlFzf3lLQRPJknrpA4 VDUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716505760; x=1717110560; 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=UkWMu8dLgBQslrOlCwfLt/yP6TjinsGZIeno/YYDSKI=; b=gqlwWNWFSjlL8UpWEOHcfnFxD5EsgK3O4+n0DHSj9Ks2kxtXN2Vnx5Fq3dl2eLD42B qbXBscR5dfJ9Wnf+I1UnPsOpmOhnW8tIIp+B4oM5nqySGL93XBpczcx1GC1lUr585rQ7 nM6WD170ocFYXy4YkoTNwqpOJFHexUZIy7rEntDsX/lwjMGn8hiwp8gmlf+jzJ7VDx6M Ps/wk8jnTrIbJCluuxbGBVb9OTeQDKp8Q13HcUQaRTevz7nsQrC+hKL3wYq8g3EQ+iMx 82FIeJy0RMS4tOcgOl4s6gNdRqudIau/VCdlm23N8cx4NBOeAkOFdCP39IbincT1sl2X J6Bg== X-Forwarded-Encrypted: i=1; AJvYcCWFmU7HA7c47zpsSbdzj1VKY9XvNHDdRi28ai+N5ru+b9RQ+bDy6+SrSvliqRLMtGYAhS6F2hf9UTPGIOKyYkh7L5x9 X-Gm-Message-State: AOJu0YygWNJbSrYXHR1qdGi91J9b02kCLjr47ffIlGxa7MIeJFi3+Ex9 9eN+VmZs/dL/GdYCYFc4h71iv4VnLHwDHiG0VtclFqAzgICNsrsW2mVNMA== X-Google-Smtp-Source: AGHT+IG2QbaOqlS+k/fwNNkCCOZKwjiCJdr2g6sBQZ7UmApZtLve+ucOlnHBVnE1TvSRAFPiSBhTBg== X-Received: by 2002:a17:902:d486:b0:1f3:1cb9:47a0 with SMTP id d9443c01a7336-1f44870a07cmr9631925ad.27.1716505759890; Thu, 23 May 2024 16:09:19 -0700 (PDT) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , qemu-ppc@nongnu.org, Richard Henderson Subject: [PULL 26/72] target/ppc: larx/stcx generation need only apply DEF_MEMOP() once Date: Fri, 24 May 2024 09:06:59 +1000 Message-ID: <20240523230747.45703-27-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::62f; envelope-from=npiggin@gmail.com; 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, FREEMAIL_FROM=0.001, 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 @gmail.com) X-ZM-MESSAGEID: 1716506513315100005 Content-Type: text/plain; charset="utf-8" Use DEF_MEMOP() consistently in larx and stcx. generation, and apply it once when it's used rather than where the macros are expanded, to reduce typing. Reviewed-by: Richard Henderson Signed-off-by: Nicholas Piggin --- target/ppc/translate.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 546f1754de..6c103dafe0 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -2849,7 +2849,7 @@ static void gen_load_locked(DisasContext *ctx, MemOp = memop) =20 gen_set_access_type(ctx, ACCESS_RES); gen_addr_reg_index(ctx, t0); - tcg_gen_qemu_ld_tl(gpr, t0, ctx->mem_idx, memop | MO_ALIGN); + tcg_gen_qemu_ld_tl(gpr, t0, ctx->mem_idx, DEF_MEMOP(memop) | MO_ALIGN); tcg_gen_mov_tl(cpu_reserve, t0); tcg_gen_movi_tl(cpu_reserve_length, memop_size(memop)); tcg_gen_mov_tl(cpu_reserve_val, gpr); @@ -2862,9 +2862,9 @@ static void gen_##name(DisasContext *ctx) \ } =20 /* lwarx */ -LARX(lbarx, DEF_MEMOP(MO_UB)) -LARX(lharx, DEF_MEMOP(MO_UW)) -LARX(lwarx, DEF_MEMOP(MO_UL)) +LARX(lbarx, MO_UB) +LARX(lharx, MO_UW) +LARX(lwarx, MO_UL) =20 static void gen_fetch_inc_conditional(DisasContext *ctx, MemOp memop, TCGv EA, TCGCond cond, int addend) @@ -3109,15 +3109,15 @@ static void gen_##name(DisasContext *ctx) \ gen_conditional_store(ctx, memop); \ } =20 -STCX(stbcx_, DEF_MEMOP(MO_UB)) -STCX(sthcx_, DEF_MEMOP(MO_UW)) -STCX(stwcx_, DEF_MEMOP(MO_UL)) +STCX(stbcx_, MO_UB) +STCX(sthcx_, MO_UW) +STCX(stwcx_, MO_UL) =20 #if defined(TARGET_PPC64) /* ldarx */ -LARX(ldarx, DEF_MEMOP(MO_UQ)) +LARX(ldarx, MO_UQ) /* stdcx. */ -STCX(stdcx_, DEF_MEMOP(MO_UQ)) +STCX(stdcx_, MO_UQ) =20 /* lqarx */ static void gen_lqarx(DisasContext *ctx) --=20 2.43.0