accel/tcg: Use one_insn_per_tb global instead of old singlestep global
The only place left that looks at the old 'singlestep' global variable is the TCG curr_cflags() function. Replace the old global with a new 'one_insn_per_tb' which is defined in tcg-all.c and declared in accel/tcg/internal.h. This keeps it restricted to the TCG code, unlike 'singlestep' which was available to every file in the system and defined in multiple different places for softmmu vs linux-user vs bsd-user. While we're making this change, use qatomic_read() and qatomic_set() on the accesses to the new global, because TCG will read it without holding a lock. Signed-off-by:Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20230417164041.684562-4-peter.maydell@linaro.org
Showing
- accel/tcg/cpu-exec.c 1 addition, 1 deletionaccel/tcg/cpu-exec.c
- accel/tcg/internal.h 2 additions, 0 deletionsaccel/tcg/internal.h
- accel/tcg/tcg-all.c 4 additions, 2 deletionsaccel/tcg/tcg-all.c
- bsd-user/main.c 0 additions, 1 deletionbsd-user/main.c
- include/exec/cpu-common.h 0 additions, 2 deletionsinclude/exec/cpu-common.h
- linux-user/main.c 0 additions, 1 deletionlinux-user/main.c
- softmmu/globals.c 0 additions, 1 deletionsoftmmu/globals.c
Please register or sign in to comment