Hexagon (target/hexagon) Remove unused slot variable in helpers
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>
diff --git a/target/hexagon/gen_helper_funcs.py b/target/hexagon/gen_helper_funcs.py
index c4e0450..c73d792 100755
--- a/target/hexagon/gen_helper_funcs.py
+++ b/target/hexagon/gen_helper_funcs.py
@@ -308,8 +308,6 @@
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
diff --git a/target/hexagon/macros.h b/target/hexagon/macros.h
index 21b5b5a..9ddfc91 100644
--- a/target/hexagon/macros.h
+++ b/target/hexagon/macros.h
@@ -347,9 +347,9 @@
#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 @@
#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.c b/target/hexagon/op_helper.c
index 099c111..3cc71b6 100644
--- a/target/hexagon/op_helper.c
+++ b/target/hexagon/op_helper.c
@@ -53,7 +53,7 @@
}
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/op_helper.h b/target/hexagon/op_helper.h
index 34b3a53..db22b54 100644
--- a/target/hexagon/op_helper.h
+++ b/target/hexagon/op_helper.h
@@ -27,7 +27,7 @@
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,