Hexagon (target/hexagon) Remove unused slot variable in helpers
PATCH 1/1 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 <[email protected]>
--- target/hexagon/macros.h | 2 +- target/hexagon/op_helper.h | 2 +- target/hexagon/op_helper.c | 2 +- target/hexagon/gen_helper_funcs.py | 2 -- 4 files changed, 3 insertions(+), 5 deletions(-)
target/hexagon/macros.h +1 -1
@@ -28,7 +28,7 @@#define READ_REG (NUM ) (env->gpr[(NUM)])#define READ_PREG (NUM ) (env->pred[NUM]) -#define WRITE_RREG (NUM ,VAL ) log_reg_write(env, NUM, VAL, slot) +#define WRITE_RREG (NUM ,VAL ) log_reg_write(env, NUM, VAL)#define WRITE_PREG (NUM ,VAL ) log_pred_write(env, NUM, VAL)#endif
target/hexagon/op_helper.h +1 -1
@@ -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,
target/hexagon/op_helper.c +1 -1
@@ -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);
target/hexagon/gen_helper_funcs.py +0 -2
@@ -265,8 +265,6 @@ def gen_helper_function(f, tag, tagregs, tagimms): if i > 0: 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 i=0
Signature · 1 line
2.25.1
Quoted 5 lines · Taylor Simpson
The slot variable in helpers was only passed to
log_reg_writefunction where the argument is unused.
- Remove declaration from generated helper functions
- Remove slot argument fromlog_reg_write
Quoted 7 lines
Signed-off-by Taylor Simpson<[email protected]>--- target/hexagon/macros.h | 2 +- target/hexagon/op_helper.h | 2 +- target/hexagon/op_helper.c | 2 +- target/hexagon/gen_helper_funcs.py | 2 -- 4 files changed, 3 insertions(+), 5 deletions(-)
Reviewed-by Richard Henderson <[email protected]>
r~