]> xenbits.xensource.com Git - people/aperard/qemu-dm.git/commitdiff
Hexagon (target/hexagon) Remove unused slot variable in helpers
authorTaylor Simpson <tsimpson@quicinc.com>
Fri, 7 Apr 2023 20:45:21 +0000 (13:45 -0700)
committerTaylor Simpson <tsimpson@quicinc.com>
Fri, 21 Apr 2023 16:32:52 +0000 (09:32 -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/gen_helper_funcs.py
target/hexagon/macros.h
target/hexagon/op_helper.c
target/hexagon/op_helper.h

index c4e04508f8aa93ee1517e33d6dd92c47cdcfaa3f..c73d792580c7a703ac67b187ee76d34969a5f731 100755 (executable)
@@ -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
index 21b5b5a06cfe6c62f04b08a3c980e390908625ad..9ddfc91b1d1198814d1e3177e4db48687fe44ab4 100644 (file)
@@ -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)
index 099c111a8c4b1d1e76455c6c83423f32f22a90d4..3cc71b69d948c50c1a3c16bb0fce48df08a9e2ae 100644 (file)
@@ -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);
index 34b3a539758f3ae56343a71bd80c8cf2ab91231a..db22b54401e3311f8121b4996cff72a518790f5c 100644 (file)
@@ -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,