From nobody Thu Oct 31 00:19:53 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=1623660707; cv=none; d=zohomail.com; s=zohoarc; b=lwqVb8731ouIJj3CacykXKxo5BunlfgGYU6i1iyKkQZ/nPjSmv5MVXmuqUSFyYESTUwtsyeofKAE4io+Bxu/nkzoLFfyZNf4P4ayCuRVeLdLA0jfeR08GcD52hFQapP3UzvJ7CDdhP4Ea74nzzPt8I3oUlv6abd+JefzYYJFe5U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623660707; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WhSFZreDO53AzLKGFi8wjggrqQhc1QnKvAfjWIRryI8=; b=Hm/yf4mwkFFhSxnTUewfjAp/5RpylYpjiv82NLiX8HBcM1k2LkL3PQwLSA0ldWSJpD531XXenstn4ZyI7lMOUVwgyEKLIO9OTGJNeEvDCMwtbD/vr6JICLJapkJNtcg0Oserl2ItNGrLEIyWb3d/9INDp9ZLoqI1EX0XvM4Zoak= 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 1623660707641698.621101212365; Mon, 14 Jun 2021 01:51:47 -0700 (PDT) Received: from localhost ([::1]:48482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsiJu-0002NI-K0 for importer@patchew.org; Mon, 14 Jun 2021 04:51:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsi6n-000285-G1 for qemu-devel@nongnu.org; Mon, 14 Jun 2021 04:38:13 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:37410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsi6f-0003Vf-Vj for qemu-devel@nongnu.org; Mon, 14 Jun 2021 04:38:13 -0400 Received: by mail-pl1-x631.google.com with SMTP id h12so6158798plf.4 for ; Mon, 14 Jun 2021 01:38:05 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id h20sm2242022pfh.24.2021.06.14.01.38.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jun 2021 01:38:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=WhSFZreDO53AzLKGFi8wjggrqQhc1QnKvAfjWIRryI8=; b=RgLOPHr4ymADW1P+bAuhcZbbNx5dsctX6D2MMCCWJ+aTw2/X9uLDi+SnGMMHmhpPj1 iSK9dwNUxQP0t0H8Wjh1TqFZVJ8inCDbiTFnhkYTDq4IlQHDZ0aSrl15mFKrdR3S9A5v z+pZwUcAniXmEgVcgGmp+eo1sGC7zwXHwFAbNzf4u4r5Qz3lf8drptd8XGG9grVyWRdo fwxN1EOeskeHhb5FN6sU+/B6k2joO95FOd5POyMycWgMjWbbK7gGU4UTDlcrSZcG3taq oAPvltcB8NVN03v2/xWDi7HCJWE+t8tOjEjwlBtYn2kBsUFzq85Pm1wecKGMIWnZgR6T vrug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WhSFZreDO53AzLKGFi8wjggrqQhc1QnKvAfjWIRryI8=; b=IYXF3N77zgSxNt66Rb/dAJbpmpAY6fzOIiuUqtQYcDEqRCA5BzMbOoTaZBVMkk3FJV 2m6iFX/avwDvNt6BdlJjYbgEan89Yjen+2qpdabbOmH2wBBfT7kA65IL8Mx+CA/11kF5 hFnO88sF4BuzppkZvz9baEq9cKWrgrsZu5Pza0msghYaNnky9AfXFAsLpl/LfCAdz6Rx he6ikEwP/VfQ9RBcNqaZed4Rf1iqx9iRAurXip56J0+OcP7Pbw5QRsepiTDdjISNpqs9 IiTLHDgaEJlGSEB78BWrUAnMBp1hlmN5pzXZQfaG95CONz+a4e8Hs9OprAsWFEIsarDM MkQw== X-Gm-Message-State: AOAM530i0mOXAjZqz8R52+XI8y25yEyFntQERqiSvcUHtyCv2ghxOwwr aXAg8sLXYSiWBuju3B3LDpTcUbTR5QPBug== X-Google-Smtp-Source: ABdhPJzWLo6V0043MDBIfP1b5+9GmkIwGTGZWtnz1WOWezWfZwJEmDgMOpoIChQ4tzWdfbo16csSIQ== X-Received: by 2002:a17:902:e747:b029:114:af78:1776 with SMTP id p7-20020a170902e747b0290114af781776mr15981671plf.2.1623659884496; Mon, 14 Jun 2021 01:38:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 05/28] tcg/ppc: Split out tcg_out_ext{8,16,32}s Date: Mon, 14 Jun 2021 01:37:37 -0700 Message-Id: <20210614083800.1166166-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210614083800.1166166-1-richard.henderson@linaro.org> References: <20210614083800.1166166-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::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.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.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" We will shortly require these in other context; make the expansion as clear as possible. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tcg/ppc/tcg-target.c.inc | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 795701442b..aa35ff8250 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -738,6 +738,21 @@ static inline void tcg_out_rlw(TCGContext *s, int op, = TCGReg ra, TCGReg rs, tcg_out32(s, op | RA(ra) | RS(rs) | SH(sh) | MB(mb) | ME(me)); } =20 +static inline void tcg_out_ext8s(TCGContext *s, TCGReg dst, TCGReg src) +{ + tcg_out32(s, EXTSB | RA(dst) | RS(src)); +} + +static inline void tcg_out_ext16s(TCGContext *s, TCGReg dst, TCGReg src) +{ + tcg_out32(s, EXTSH | RA(dst) | RS(src)); +} + +static inline void tcg_out_ext32s(TCGContext *s, TCGReg dst, TCGReg src) +{ + tcg_out32(s, EXTSW | RA(dst) | RS(src)); +} + static inline void tcg_out_ext32u(TCGContext *s, TCGReg dst, TCGReg src) { tcg_out_rld(s, RLDICL, dst, src, 0, 32); @@ -2322,7 +2337,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const int const_args[TCG_MAX_OP_ARGS]) { TCGArg a0, a1, a2; - int c; =20 switch (opc) { case INDEX_op_exit_tb: @@ -2390,7 +2404,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, case INDEX_op_ld8s_i32: case INDEX_op_ld8s_i64: tcg_out_mem_long(s, LBZ, LBZX, args[0], args[1], args[2]); - tcg_out32(s, EXTSB | RS(args[0]) | RA(args[0])); + tcg_out_ext8s(s, args[0], args[0]); break; case INDEX_op_ld16u_i32: case INDEX_op_ld16u_i64: @@ -2728,18 +2742,15 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, =20 case INDEX_op_ext8s_i32: case INDEX_op_ext8s_i64: - c =3D EXTSB; - goto gen_ext; + tcg_out_ext8s(s, args[0], args[1]); + break; case INDEX_op_ext16s_i32: case INDEX_op_ext16s_i64: - c =3D EXTSH; - goto gen_ext; + tcg_out_ext16s(s, args[0], args[1]); + break; case INDEX_op_ext_i32_i64: case INDEX_op_ext32s_i64: - c =3D EXTSW; - goto gen_ext; - gen_ext: - tcg_out32(s, c | RS(args[1]) | RA(args[0])); + tcg_out_ext32s(s, args[0], args[1]); break; case INDEX_op_extu_i32_i64: tcg_out_ext32u(s, args[0], args[1]); --=20 2.25.1