sim: riscv: fix -Wshadow=local warnings

Inline the one usage of sd in these macros to avoid possible shadowing.
This commit is contained in:
Mike Frysinger 2023-12-21 20:13:56 -05:00
parent 5cc45e2384
commit f0fcc327e3

View File

@ -48,10 +48,9 @@ static const struct riscv_opcode *riscv_hash[OP_MASK_OP + 1];
do { \
if (RISCV_XLEN (cpu) != 32) \
{ \
SIM_DESC sd = CPU_STATE (cpu); \
TRACE_INSN (cpu, "RV32I-only " fmt, ## args); \
sim_engine_halt (sd, cpu, NULL, sim_pc_get (cpu), sim_signalled, \
SIM_SIGILL); \
sim_engine_halt (CPU_STATE (cpu), cpu, NULL, sim_pc_get (cpu), \
sim_signalled, SIM_SIGILL); \
} \
} while (0)
@ -59,10 +58,9 @@ static const struct riscv_opcode *riscv_hash[OP_MASK_OP + 1];
do { \
if (RISCV_XLEN (cpu) != 64) \
{ \
SIM_DESC sd = CPU_STATE (cpu); \
TRACE_INSN (cpu, "RV64I-only " fmt, ## args); \
sim_engine_halt (sd, cpu, NULL, sim_pc_get (cpu), sim_signalled, \
SIM_SIGILL); \
sim_engine_halt (CPU_STATE (cpu), cpu, NULL, sim_pc_get (cpu), \
sim_signalled, SIM_SIGILL); \
} \
} while (0)