From nobody Tue Feb 10 05:46:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1543614920520844.7489469002494; Fri, 30 Nov 2018 13:55:20 -0800 (PST) Received: from localhost ([::1]:34739 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSqkp-0002i7-HB for importer@patchew.org; Fri, 30 Nov 2018 16:55:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSqiC-0007zl-Fk for qemu-devel@nongnu.org; Fri, 30 Nov 2018 16:52:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSqi9-0006qS-KR for qemu-devel@nongnu.org; Fri, 30 Nov 2018 16:52:36 -0500 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:36944) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gSqi9-0006lu-EA for qemu-devel@nongnu.org; Fri, 30 Nov 2018 16:52:33 -0500 Received: by mail-pf1-x444.google.com with SMTP id y126so3440178pfb.4 for ; Fri, 30 Nov 2018 13:52:33 -0800 (PST) Received: from cloudburst.twiddle.net (97-113-170-180.tukw.qwest.net. [97.113.170.180]) by smtp.gmail.com with ESMTPSA id a18sm6973967pgj.30.2018.11.30.13.52.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Nov 2018 13:52:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SdEJC75HoX+aaLFVYPRT91luz3tIvq+5jmKsSfMgW5w=; b=bBqYqc9eN4KuSEn8KaKm6OyqW0hOTSjHoQ78Z91gv0RKgrgV6Nv2dnVAbrT4DF2/JT N8b4gTDxHFKxzECCr1NciuWAZZgJoujrY5IoS96JMrjXGprihzHfaU2K83S9iSO6o1C4 y/rAMufZaA16X9zN38Uf4OtrDgohy9vZSAplQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SdEJC75HoX+aaLFVYPRT91luz3tIvq+5jmKsSfMgW5w=; b=TxntZEgHVsMfZUYgWbkanBQPv5MHHq+yUNKhGjPrgCPAxsNQXd0at3KfOnrXkeHNbo gg1t/5nUtmwl42oeG6IdV3GAG9fBi69KcG7Lntt6WLmaThXK0SGakOl1EaFgvdcGVHFH zmUvVz3irLSibomOfxz6toyYS/XAuCCoTsham3ym3AFWxKcRAkGGrTf6RWkeXIeP/eif EkL5yTlmwtsiPaIJK4UZQ3zVcPkHaWPIJzRQebsKy9p0zGEL6BRnT0DoHIOyII0YrAD6 74BWGO9DpEBCXitK3kNS7CZFPZ9H0q1za2FGiS9Z5JUyWCWbb572NBBKE6Jpts1HhXo4 uEgQ== X-Gm-Message-State: AA+aEWZqpRWZNQgpX33iTBBDnNJ379InA3Yjft1509YQwUQvM/amJ2gh t/jdxeZtIBR33U8azRVKT/z6qzlbB4Y= X-Google-Smtp-Source: AFSGD/XDj6mzzsFdTCu9d08dCjvOnpokK09etNH5dp6RBDLmhXyCnbD15dESrgAiZX8F57IsjJOSGw== X-Received: by 2002:a63:561b:: with SMTP id k27mr6174371pgb.271.1543614752085; Fri, 30 Nov 2018 13:52:32 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 30 Nov 2018 13:52:12 -0800 Message-Id: <20181130215221.20554-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181130215221.20554-1-richard.henderson@linaro.org> References: <20181130215221.20554-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::444 Subject: [Qemu-devel] [PATCH v3 07/16] tcg/ppc: Fold away "noaddr" branch routines X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" There is no longer a need for preserving branch offset operands, as we no longer re-translate. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e --- tcg/ppc/tcg-target.inc.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c index c2f729ee8f..2e2a22f579 100644 --- a/tcg/ppc/tcg-target.inc.c +++ b/tcg/ppc/tcg-target.inc.c @@ -210,18 +210,6 @@ static void reloc_pc14(tcg_insn_unit *pc, tcg_insn_uni= t *target) *pc =3D (*pc & ~0xfffc) | reloc_pc14_val(pc, target); } =20 -static inline void tcg_out_b_noaddr(TCGContext *s, int insn) -{ - unsigned retrans =3D *s->code_ptr & 0x3fffffc; - tcg_out32(s, insn | retrans); -} - -static inline void tcg_out_bc_noaddr(TCGContext *s, int insn) -{ - unsigned retrans =3D *s->code_ptr & 0xfffc; - tcg_out32(s, insn | retrans); -} - /* parse target specific constraints */ static const char *target_parse_constraint(TCGArgConstraint *ct, const char *ct_str, TCGType typ= e) @@ -1179,11 +1167,11 @@ static void tcg_out_setcond(TCGContext *s, TCGType = type, TCGCond cond, static void tcg_out_bc(TCGContext *s, int bc, TCGLabel *l) { if (l->has_value) { - tcg_out32(s, bc | reloc_pc14_val(s->code_ptr, l->u.value_ptr)); + bc |=3D reloc_pc14_val(s->code_ptr, l->u.value_ptr); } else { tcg_out_reloc(s, s->code_ptr, R_PPC_REL14, l, 0); - tcg_out_bc_noaddr(s, bc); } + tcg_out32(s, bc); } =20 static void tcg_out_brcond(TCGContext *s, TCGCond cond, @@ -1771,7 +1759,7 @@ static void tcg_out_qemu_ld(TCGContext *s, const TCGA= rg *args, bool is_64) =20 /* Load a pointer into the current opcode w/conditional branch-link. */ label_ptr =3D s->code_ptr; - tcg_out_bc_noaddr(s, BC | BI(7, CR_EQ) | BO_COND_FALSE | LK); + tcg_out32(s, BC | BI(7, CR_EQ) | BO_COND_FALSE | LK); =20 rbase =3D TCG_REG_R3; #else /* !CONFIG_SOFTMMU */ @@ -1846,7 +1834,7 @@ static void tcg_out_qemu_st(TCGContext *s, const TCGA= rg *args, bool is_64) =20 /* Load a pointer into the current opcode w/conditional branch-link. */ label_ptr =3D s->code_ptr; - tcg_out_bc_noaddr(s, BC | BI(7, CR_EQ) | BO_COND_FALSE | LK); + tcg_out32(s, BC | BI(7, CR_EQ) | BO_COND_FALSE | LK); =20 rbase =3D TCG_REG_R3; #else /* !CONFIG_SOFTMMU */ @@ -2044,13 +2032,14 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc= , const TCGArg *args, case INDEX_op_br: { TCGLabel *l =3D arg_label(args[0]); + uint32_t insn =3D B; =20 if (l->has_value) { - tcg_out_b(s, 0, l->u.value_ptr); + insn |=3D reloc_pc24_val(s->code_ptr, l->u.value_ptr); } else { tcg_out_reloc(s, s->code_ptr, R_PPC_REL24, l, 0); - tcg_out_b_noaddr(s, B); } + tcg_out32(s, insn); } break; case INDEX_op_ld8u_i32: --=20 2.17.2