From patchwork Mon Feb 27 05:24:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 656803 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2181449wrb; Sun, 26 Feb 2023 21:39:08 -0800 (PST) X-Google-Smtp-Source: AK7set8G/C98aJ6Qeabhv79WvOE9iy1++tce8oxcPrruqxqMgNxrJ/01XIcqXVYYmXdxD7ThsgGr X-Received: by 2002:ac8:598e:0:b0:3b8:588c:40e9 with SMTP id e14-20020ac8598e000000b003b8588c40e9mr43698967qte.19.1677476348440; Sun, 26 Feb 2023 21:39:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677476348; cv=none; d=google.com; s=arc-20160816; b=afn94Swzcf0MPGOVdqot78lvJ7cwqKYn+pn9ef9HieGh1PmF+zNtoP700ebvYKI4bZ /7qDxN2lbNWGK2kXPJg3bhhFRNeDID5/9zOuGyvDhJIB9efMsQjRwbz2JXaDeZSraLMG xtZDMDzOZAafgSzj8yi3WFOgst03pV24XH78sd3D57jOLr60E6b7KXK0zCN94p5SW+EN Z633o+4Rx4g/BuWk/K14YDVoqbgyr/9LL/pq6NT3BefbedcPMm9tvHhHxEZa5+6U/47+ HwQf7bPxrJtqw3pd9+SCIgyNsLVANR4ITuZ59e9B2tofrvDL/2TfWncU0lA9Kr0gGWsm zTkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=71aFye+WP3h6iEWEabrVi+cTpkdhpONrYK9bA8dUw1w=; b=jPFU00RW33wZhXJfFY5hCKEqsNB1+NWDZKLSkQuI4VjOjb+C9LbWLfZYTrCCK6P0Rw SDmirPb0bU1njLmnbg3gaq1qQcYvpy1Y9NX9+VrGA3WAeETLbDNRmpIXY9imEnMe02WS RG5aufcoMqJ7Furh8Pq4bU2ez1wdC2QpXWRATkVLqxbl/auTu2xQx2zO1IuaFcLrHB48 hQKb577oIhZsetut1L7xGz3unMNMmFghF48LsAkA81fA5ky29uusTZGGg0+hYXA1LLwE AVhiuRt4nU1I1TWt0PAne/ax5VpWKDO9uVyIDdFEXJO3g+O6PB1mtIbOUZ/W/gWM57Uo Gigw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q5n8RMLd; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x1-20020a05622a000100b003bfb62bbbb8si6140189qtw.243.2023.02.26.21.39.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 26 Feb 2023 21:39:08 -0800 (PST) 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=Q5n8RMLd; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWW1v-0008IU-Im; Mon, 27 Feb 2023 00:26:31 -0500 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 1pWW1s-0008BL-Na for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:26:28 -0500 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWW1n-0007iJ-3S for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:26:28 -0500 Received: by mail-pj1-x1043.google.com with SMTP id h17-20020a17090aea9100b0023739b10792so5052786pjz.1 for ; Sun, 26 Feb 2023 21:26:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=71aFye+WP3h6iEWEabrVi+cTpkdhpONrYK9bA8dUw1w=; b=Q5n8RMLdumFshWYGiMjd5WBTB6KGLZ69qWxkM+c2EWG0yF7hUmXFZAlF2vIWg4iyMx 2ixCOtF45dyF0iQRjJoFvANR9XzpXyL1Vn59O/OFVttdxrop/o9+i4j+rE96pVb9M1wS 8cdKDcyyBrWLBZbnob5vmH62udbIen5b3SLnMddswwYWNpx51xSxczCFjCTGAKnDBxzC FAY4u2pIt1HXcYHFoEiuKqP5nXPUheQysia2eduLb6X+LWcLsjTk5OyizXrE3kKhSlzy zMtDuDIlglezchGyHyAViBFz3xCJePAaNeNTk32rI8fdhi+2kQ32by8OB7SqaAvtTnPL Vwjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=71aFye+WP3h6iEWEabrVi+cTpkdhpONrYK9bA8dUw1w=; b=7QddCfK5HT6Ag2Q11ve80+YWIN3WlYwQYIsmNRDDoVkqr5u0WVnO/VUyKtf4l6eE40 6hwrN8kYcjH4ZBe8KfdrlVwcqt1JvU3b1gdRH/NKmxy4bEfQr5O7iNIUiFpKc8V/TL+j oHDuskliuwCGqU6WJrzrOy2riBZCpovfy6kOpqkc19vG+hqgsLVPAd/0iQ4ZvYq7sAPV NPWFh6imNqO//5mptq1SlHZOQd736XKxCzhxgVJdjIgL+T6F0mxP6d3boASx7N0XtmMF hL/Yl2I1ebnFl8COQ+ViLXGOp9WTcs527tXn2ATx7fmzvcDcG02//PMPbk+MCPC/pDgr TK0w== X-Gm-Message-State: AO0yUKUB4HrU/9KfSGB1jCVWhcLCuPPG4HTRsY+YE357HWSKMDo/6Mfv VTyONYUJBKm70i31Uqlg7O4RboBjCPaWlKhaZ8iKuA== X-Received: by 2002:a17:903:2908:b0:19d:135:2013 with SMTP id lh8-20020a170903290800b0019d01352013mr3812096plb.26.1677475581659; Sun, 26 Feb 2023 21:26:21 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id a14-20020a170902ecce00b0019a837be977sm3513341plh.271.2023.02.26.21.26.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:26:21 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com Subject: [PATCH v2 26/76] target/hexagon: Drop tcg_temp_free from gen_tcg_funcs.py Date: Sun, 26 Feb 2023 19:24:15 -1000 Message-Id: <20230227052505.352889-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227052505.352889-1-richard.henderson@linaro.org> References: <20230227052505.352889-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1043; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1043.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=unavailable 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 Translators are no longer required to free tcg temporaries. Signed-off-by: Richard Henderson Reviewed-by: Taylor Simpson --- target/hexagon/gen_tcg_funcs.py | 79 +-------------------------------- 1 file changed, 1 insertion(+), 78 deletions(-) diff --git a/target/hexagon/gen_tcg_funcs.py b/target/hexagon/gen_tcg_funcs.py index dfc90712fb..02cb52c21e 100755 --- a/target/hexagon/gen_tcg_funcs.py +++ b/target/hexagon/gen_tcg_funcs.py @@ -26,10 +26,7 @@ ## Helpers for gen_tcg_func ## def gen_decl_ea_tcg(f, tag): - f.write(" TCGv EA = tcg_temp_new();\n") - -def gen_free_ea_tcg(f): - f.write(" tcg_temp_free(EA);\n") + f.write(" TCGv EA G_GNUC_UNUSED = tcg_temp_new();\n") def genptr_decl_pair_writable(f, tag, regtype, regid, regno): regN="%s%sN" % (regtype,regid) @@ -269,73 +266,6 @@ def genptr_decl_imm(f,immlett): f.write(" int %s = insn->immed[%d];\n" % \ (hex_common.imm_name(immlett), i)) -def genptr_free(f, tag, regtype, regid, regno): - if (regtype == "R"): - if (regid in {"dd", "ss", "tt", "xx", "yy"}): - f.write(" tcg_temp_free_i64(%s%sV);\n" % (regtype, regid)) - elif (regid in {"d", "e", "x", "y"}): - f.write(" tcg_temp_free(%s%sV);\n" % (regtype, regid)) - elif (regid not in {"s", "t", "u", "v"}): - print("Bad register parse: ",regtype,regid) - elif (regtype == "P"): - if (regid in {"d", "e", "x"}): - f.write(" tcg_temp_free(%s%sV);\n" % (regtype, regid)) - elif (regid not in {"s", "t", "u", "v"}): - print("Bad register parse: ",regtype,regid) - elif (regtype == "C"): - if (regid in {"dd", "ss"}): - f.write(" tcg_temp_free_i64(%s%sV);\n" % (regtype, regid)) - elif (regid in {"d", "s"}): - f.write(" tcg_temp_free(%s%sV);\n" % (regtype, regid)) - else: - print("Bad register parse: ",regtype,regid) - elif (regtype == "M"): - if (regid != "u"): - print("Bad register parse: ", regtype, regid) - elif (regtype == "V"): - if (regid in {"dd", "uu", "vv", "xx", \ - "d", "s", "u", "v", "w", "x", "y"}): - if (not hex_common.skip_qemu_helper(tag)): - f.write(" tcg_temp_free_ptr(%s%sV);\n" % \ - (regtype, regid)) - else: - print("Bad register parse: ", regtype, regid) - elif (regtype == "Q"): - if (regid in {"d", "e", "s", "t", "u", "v", "x"}): - if (not hex_common.skip_qemu_helper(tag)): - f.write(" tcg_temp_free_ptr(%s%sV);\n" % \ - (regtype, regid)) - else: - print("Bad register parse: ", regtype, regid) - else: - print("Bad register parse: ", regtype, regid) - -def genptr_free_new(f, tag, regtype, regid, regno): - if (regtype == "N"): - if (regid not in {"s", "t"}): - print("Bad register parse: ", regtype, regid) - elif (regtype == "P"): - if (regid not in {"t", "u", "v"}): - print("Bad register parse: ", regtype, regid) - elif (regtype == "O"): - if (regid != "s"): - print("Bad register parse: ", regtype, regid) - else: - print("Bad register parse: ", regtype, regid) - -def genptr_free_opn(f,regtype,regid,i,tag): - if (hex_common.is_pair(regid)): - genptr_free(f, tag, regtype, regid, i) - elif (hex_common.is_single(regid)): - if hex_common.is_old_val(regtype, regid, tag): - genptr_free(f, tag, regtype, regid, i) - elif hex_common.is_new_val(regtype, regid, tag): - genptr_free_new(f, tag, regtype, regid, i) - else: - print("Bad register parse: ",regtype,regid,toss,numregs) - else: - print("Bad register parse: ",regtype,regid,toss,numregs) - def genptr_src_read(f, tag, regtype, regid): if (regtype == "R"): if (regid in {"ss", "tt", "xx", "yy"}): @@ -578,7 +508,6 @@ def genptr_dst_write_opn(f,regtype, regid, tag): ## ## gen_log_reg_write(RdN, RdV); ## ctx_log_reg_write(ctx, RdN); -## tcg_temp_free(RdV); ## } ## ## where depends on hex_common.skip_qemu_helper(tag) @@ -692,12 +621,6 @@ def gen_tcg_func(f, tag, regs, imms): if (hex_common.is_written(regid)): genptr_dst_write_opn(f,regtype, regid, tag) - ## Free all the operands (regs and immediates) - if hex_common.need_ea(tag): gen_free_ea_tcg(f) - for regtype,regid,toss,numregs in regs: - genptr_free_opn(f,regtype,regid,i,tag) - i += 1 - f.write("}\n\n") def gen_def_tcg_func(f, tag, tagregs, tagimms):