summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTaylor Simpson <tsimpson@quicinc.com>2023-04-07 13:45:21 -0700
committerTaylor Simpson <tsimpson@quicinc.com>2023-04-21 09:32:52 -0700
commit111c529aa652fde71fe54a91776ffd166b724b42 (patch)
treee234b28a54e614c6a8d00956b8b78424aad3fb5a
parent761e1c675e73502f95fc9e70aaeb4f228985cc44 (diff)
downloadfocaccia-qemu-111c529aa652fde71fe54a91776ffd166b724b42.tar.gz
focaccia-qemu-111c529aa652fde71fe54a91776ffd166b724b42.zip
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>
-rwxr-xr-xtarget/hexagon/gen_helper_funcs.py2
-rw-r--r--target/hexagon/macros.h14
-rw-r--r--target/hexagon/op_helper.c2
-rw-r--r--target/hexagon/op_helper.h2
4 files changed, 9 insertions, 11 deletions
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
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.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/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,