[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 37/84] target/hexagon: Drop tcg_temp_free from gen_tcg_funcs.py
From: |
Richard Henderson |
Subject: |
[PULL 37/84] target/hexagon: Drop tcg_temp_free from gen_tcg_funcs.py |
Date: |
Sun, 5 Mar 2023 16:39:07 -0800 |
Translators are no longer required to free tcg temporaries.
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
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>
## gen_log_reg_write(RdN, RdV);
## ctx_log_reg_write(ctx, RdN);
-## tcg_temp_free(RdV);
## }
##
## where <GEN> 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):
--
2.34.1
- [PULL 39/84] target/hexagon/idef-parser: Drop HexValue.is_manual, (continued)
- [PULL 39/84] target/hexagon/idef-parser: Drop HexValue.is_manual, Richard Henderson, 2023/03/05
- [PULL 36/84] target/hexagon: Drop tcg_temp_free from C code, Richard Henderson, 2023/03/05
- [PULL 31/84] target/avr: Drop tcg_temp_free, Richard Henderson, 2023/03/05
- [PULL 12/84] tcg: Remove tcg_check_temp_count, tcg_clear_temp_count, Richard Henderson, 2023/03/05
- [PULL 32/84] target/cris: Drop cris_alu_free_temps, Richard Henderson, 2023/03/05
- [PULL 35/84] target/cris: Drop tcg_temp_free, Richard Henderson, 2023/03/05
- [PULL 15/84] target/arm: Remove arm_free_cc, a64_free_cc, Richard Henderson, 2023/03/05
- [PULL 21/84] target/arm: Drop tcg_temp_free from translator-a64.c, Richard Henderson, 2023/03/05
- [PULL 23/84] target/arm: Drop tcg_temp_free from translator-mve.c, Richard Henderson, 2023/03/05
- [PULL 33/84] target/cris: Drop cris_alu_m_free_temps, Richard Henderson, 2023/03/05
- [PULL 37/84] target/hexagon: Drop tcg_temp_free from gen_tcg_funcs.py,
Richard Henderson <=
- [PULL 38/84] target/hexagon/idef-parser: Drop tcg_temp_free, Richard Henderson, 2023/03/05
- [PULL 20/84] target/arm: Drop new_tmp_a64_zero, Richard Henderson, 2023/03/05
- [PULL 42/84] target/loongarch: Drop tcg_temp_free, Richard Henderson, 2023/03/05
- [PULL 48/84] target/openrisc: Drop tcg_temp_free, Richard Henderson, 2023/03/05
- [PULL 57/84] target/sparc: Remove egress label in disas_sparc_context, Richard Henderson, 2023/03/05
- [PULL 41/84] target/loongarch: Drop temp_new, Richard Henderson, 2023/03/05
- [PULL 58/84] target/sparc: Drop free_compare, Richard Henderson, 2023/03/05
- [PULL 52/84] target/riscv: Drop tcg_temp_free, Richard Henderson, 2023/03/05
- [PULL 60/84] target/xtensa: Drop reset_sar_tracker, Richard Henderson, 2023/03/05
- [PULL 55/84] target/sparc: Drop get_temp_tl, Richard Henderson, 2023/03/05