[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 09/10] Hexagon (target/hexagon) Remove unused slot variable in
From: |
Taylor Simpson |
Subject: |
[PULL v2 09/10] Hexagon (target/hexagon) Remove unused slot variable in helpers |
Date: |
Fri, 21 Apr 2023 09:49:21 -0700 |
The slot variable in helpers was only passed to log_reg_write function
where the argument is unused.
- Remove declaration from generated helper functions
- Remove slot argument from log_reg_write
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230407204521.357244-1-tsimpson@quicinc.com>
---
target/hexagon/macros.h | 14 +++++++-------
target/hexagon/op_helper.h | 2 +-
target/hexagon/op_helper.c | 2 +-
target/hexagon/gen_helper_funcs.py | 2 --
4 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/target/hexagon/macros.h b/target/hexagon/macros.h
index 21b5b5a06c..9ddfc91b1d 100644
--- a/target/hexagon/macros.h
+++ b/target/hexagon/macros.h
@@ -347,9 +347,9 @@ static inline TCGv gen_read_ireg(TCGv result, TCGv val, int
shift)
#define fREAD_LR() (env->gpr[HEX_REG_LR])
-#define fWRITE_LR(A) log_reg_write(env, HEX_REG_LR, A, slot)
-#define fWRITE_FP(A) log_reg_write(env, HEX_REG_FP, A, slot)
-#define fWRITE_SP(A) log_reg_write(env, HEX_REG_SP, A, slot)
+#define fWRITE_LR(A) log_reg_write(env, HEX_REG_LR, A)
+#define fWRITE_FP(A) log_reg_write(env, HEX_REG_FP, A)
+#define fWRITE_SP(A) log_reg_write(env, HEX_REG_SP, A)
#define fREAD_SP() (env->gpr[HEX_REG_SP])
#define fREAD_LC0 (env->gpr[HEX_REG_LC0])
@@ -377,13 +377,13 @@ static inline TCGv gen_read_ireg(TCGv result, TCGv val,
int shift)
#define fHINTJR(TARGET) { /* Not modelled in qemu */}
#define fWRITE_LOOP_REGS0(START, COUNT) \
do { \
- log_reg_write(env, HEX_REG_LC0, COUNT, slot); \
- log_reg_write(env, HEX_REG_SA0, START, slot); \
+ log_reg_write(env, HEX_REG_LC0, COUNT); \
+ log_reg_write(env, HEX_REG_SA0, START); \
} while (0)
#define fWRITE_LOOP_REGS1(START, COUNT) \
do { \
- log_reg_write(env, HEX_REG_LC1, COUNT, slot); \
- log_reg_write(env, HEX_REG_SA1, START, slot);\
+ log_reg_write(env, HEX_REG_LC1, COUNT); \
+ log_reg_write(env, HEX_REG_SA1, START);\
} while (0)
#define fSET_OVERFLOW() SET_USR_FIELD(USR_OVF, 1)
diff --git a/target/hexagon/op_helper.h b/target/hexagon/op_helper.h
index 34b3a53975..db22b54401 100644
--- a/target/hexagon/op_helper.h
+++ b/target/hexagon/op_helper.h
@@ -27,7 +27,7 @@ uint32_t mem_load4(CPUHexagonState *env, uint32_t slot,
target_ulong vaddr);
uint64_t mem_load8(CPUHexagonState *env, uint32_t slot, target_ulong vaddr);
void log_reg_write(CPUHexagonState *env, int rnum,
- target_ulong val, uint32_t slot);
+ target_ulong val);
void log_store64(CPUHexagonState *env, target_ulong addr,
int64_t val, int width, int slot);
void log_store32(CPUHexagonState *env, target_ulong addr,
diff --git a/target/hexagon/op_helper.c b/target/hexagon/op_helper.c
index 099c111a8c..3cc71b69d9 100644
--- a/target/hexagon/op_helper.c
+++ b/target/hexagon/op_helper.c
@@ -53,7 +53,7 @@ G_NORETURN void HELPER(raise_exception)(CPUHexagonState *env,
uint32_t excp)
}
void log_reg_write(CPUHexagonState *env, int rnum,
- target_ulong val, uint32_t slot)
+ target_ulong val)
{
HEX_DEBUG_LOG("log_reg_write[%d] = " TARGET_FMT_ld " (0x" TARGET_FMT_lx
")",
rnum, val, val);
diff --git a/target/hexagon/gen_helper_funcs.py
b/target/hexagon/gen_helper_funcs.py
index c4e04508f8..c73d792580 100755
--- a/target/hexagon/gen_helper_funcs.py
+++ b/target/hexagon/gen_helper_funcs.py
@@ -308,8 +308,6 @@ def gen_helper_function(f, tag, tagregs, tagimms):
f.write(", ")
f.write("uint32_t part1")
f.write(")\n{\n")
- if not hex_common.need_slot(tag):
- f.write(" uint32_t slot __attribute__((unused)) = 4;\n")
if hex_common.need_ea(tag):
gen_decl_ea(f)
## Declare the return variable
--
2.25.1
- [PULL v2 00/10] Hexagon queue, Taylor Simpson, 2023/04/21
- [PULL v2 08/10] Hexagon (tests/tcg/hexagon) Move HVX test infra to header file, Taylor Simpson, 2023/04/21
- [PULL v2 09/10] Hexagon (target/hexagon) Remove unused slot variable in helpers,
Taylor Simpson <=
- [PULL v2 05/10] Hexagon (target/hexagon) Merge arguments to probe_pkt_scalar_hvx_stores, Taylor Simpson, 2023/04/21
- [PULL v2 04/10] Hexagon (target/hexagon) Remove redundant/unused macros, Taylor Simpson, 2023/04/21
- [PULL v2 10/10] Hexagon (target/hexagon) Add overrides for cache/sync/barrier instructions, Taylor Simpson, 2023/04/21
- [PULL v2 06/10] Hexagon (target/hexagon) Add overrides for count trailing zeros/ones, Taylor Simpson, 2023/04/21
- [PULL v2 07/10] Hexagon (target/hexagon) Updates to USR should use get_result_gpr, Taylor Simpson, 2023/04/21
- [PULL v2 01/10] Hexagon (translate.c): avoid redundant PC updates on COF, Taylor Simpson, 2023/04/21
- [PULL v2 03/10] Use black code style for python scripts, Taylor Simpson, 2023/04/21
- [PULL v2 02/10] Use f-strings in python scripts, Taylor Simpson, 2023/04/21
- Re: [PULL v2 00/10] Hexagon queue, Richard Henderson, 2023/04/22