From patchwork Sat Feb 25 09:13:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 656491 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp1357399wrb; Sat, 25 Feb 2023 01:19:51 -0800 (PST) X-Google-Smtp-Source: AK7set8agrWPYkXA9IsOYRkVoeAn33cPQb0CxNEiOnuJ9I/S3UTj/9sxVwo2n7RPk3YKSpQBtLnq X-Received: by 2002:ad4:5dc9:0:b0:539:b68e:3444 with SMTP id m9-20020ad45dc9000000b00539b68e3444mr36063097qvh.27.1677316791739; Sat, 25 Feb 2023 01:19:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677316791; cv=none; d=google.com; s=arc-20160816; b=eqBomsl7TSTrHzM10bF4MPl+MpcV8ubnk/HHqfwMc1JQKnbTryRdPG+8YHkYDxl5q4 LhyKIw+j7rsbv55vdPWq5rPjm7DWRPVOXsqGjHf5d+4c/6RLFe7EtZLA/nGqMHjlDwWg iGMqsKrbtS/75TxznP5hP3RhRGb+fIkrYGZB1UQL/3GniCVImtcEDjAZmcdM5qzsThsR l77rfqjKNquyYBWLedXgwnqLT1RARZoBBPVqvxW+jvrDhEUByvXjPOzKHFxmCcEyPsB0 PrkFdRLldUyv2J2eVSZ6tupvePoITWH4ggtjBYCZh+Bqxn9D08XZHDmECuKyffgnrqxl rELw== 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=zfEGQMYUyP7wT7zPEwcYo6Inn5l/BMjDuH4yevRdaQd9iNIqsrim2Pels03bTIudiI trK6ClP3pZUFH/QsnaBVyY3Xdz2+Z7fVe5yv2KqZW2Pzhh5oHj1Ogk5IGvrnbEx3e1Uq S4HcuTfAWLtOcqypANbWIKOr0I3OeOGXNYx3P300MKcwZVfpqz81AuU+MzXxxx6CnEdE JH28/YwcnhLgTcuJETshsBRd6zfU7FjYCLNIsEy76toopTq/QzF5AvpDMNkTDavHCQRW yuKnla9KWZJOOECOBVMmM4mMa6D9BDzi83vFnlIzDlCii7n+uwgcj1i3kRUTtlCiIfQw LX2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vws1r4HR; 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 h2-20020a05620a400200b007423b0cb821si1492937qko.674.2023.02.25.01.19.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Feb 2023 01:19:51 -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=vws1r4HR; 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 1pVqeu-0006fb-Qd; Sat, 25 Feb 2023 04:16:00 -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 1pVqeg-000650-31 for qemu-devel@nongnu.org; Sat, 25 Feb 2023 04:15:46 -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 1pVqeb-0002As-Nt for qemu-devel@nongnu.org; Sat, 25 Feb 2023 04:15:45 -0500 Received: by mail-pj1-x1043.google.com with SMTP id c23so1409170pjo.4 for ; Sat, 25 Feb 2023 01:15:41 -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=vws1r4HRhdBDY/IWpq0PK8yg3MjqyaUzmFMEl29WgnWbKK+Jonw+0CAGKBhRMPT/V5 es7lC+yDaxrspzBeh0zex4W7t9O2XcC2L12V3osWZ24ifXrcIF2CYFNsg/zW9WXyQcAj 9zRqyEaHk4qNRChlqjkRheAdNAFOEYCb6r1H8aWnc61AWLYCMijOPFqJm6OlBde6022c 9eyhHrQClyMCs+hlIunge0toD5+Kd8Qd9H4U6tBJC9/Rov0FVx0JvcsjORWe/kqFgG+x 8xtEBndA1uri+5Xk5zinldgb1z4WG58uD4jvvLW6mD+X+u3sXRhxofLcLxhqsCIeIoZL nAfg== 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=sNTVjgfGV/cCqkW5qM6TYCAP9Q3x/pk8vKepr+E4zHMsip7hVCGW27zxnuxHiV/yxb XJQpbPqVfMZJyxJHY60a2PYeeXrKprE78XzEK/Q5wwd8dSG4cU5uShndc2d9JBcsiRu7 m6jCVWgmyGwDsbz3WATcNbgh9+sSDRoc/VkfpcRBGQbq20H8OCFzQYitQBk0cJ5VbCkX CYlCJ2WAkhxmLtmyVQK5SZ7NtX3OeB1r+lZuhUiuS8Z0g5Dqxme5xQYwIj8KnqsfhCKz azaJeBUkH5TufLyU5l4unyn6KvgyTF30OdA4/Ekb17HnjYhBtpiJBaTDhJFRcq0AAVWN s+fw== X-Gm-Message-State: AO0yUKUoryYvLAvRnH8W51i3Ql9HyEg7Zn5Q7tT2Z044wcPUv7BbagSB ffP33M5dv0lY5xADOO/w1ZQDd2Dy+oI7EYHY2E6VvA== X-Received: by 2002:a17:903:5d0:b0:19c:d5f9:337f with SMTP id kf16-20020a17090305d000b0019cd5f9337fmr3882237plb.5.1677316540398; Sat, 25 Feb 2023 01:15:40 -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 je12-20020a170903264c00b0019607aeda8bsm831101plb.73.2023.02.25.01.15.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Feb 2023 01:15:39 -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 26/76] target/cris: Drop tcg_temp_free from gen_tcg_funcs.py Date: Fri, 24 Feb 2023 23:13:37 -1000 Message-Id: <20230225091427.1817156-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230225091427.1817156-1-richard.henderson@linaro.org> References: <20230225091427.1817156-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 --- 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):