summaryrefslogtreecommitdiffstats
path: root/accel/tcg
diff options
context:
space:
mode:
authorRichard Henderson2021-07-18 00:18:39 +0200
committerRichard Henderson2021-07-21 19:47:04 +0200
commit78ff82bb1b67c0d79113688e4b3427fc99cab9d4 (patch)
treeac81ba140d51101b1a00d65b3f7628c7eb065b1f /accel/tcg
parentaccel/tcg: Push trace info building into atomic_common.c.inc (diff)
downloadqemu-78ff82bb1b67c0d79113688e4b3427fc99cab9d4.tar.gz
qemu-78ff82bb1b67c0d79113688e4b3427fc99cab9d4.tar.xz
qemu-78ff82bb1b67c0d79113688e4b3427fc99cab9d4.zip
accel/tcg: Reduce CF_COUNT_MASK to match TCG_MAX_INSNS
The space reserved for CF_COUNT_MASK was overly large. Reduce to free up cflags bits and eliminate an extra test. Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20210717221851.2124573-2-richard.henderson@linaro.org>
Diffstat (limited to 'accel/tcg')
-rw-r--r--accel/tcg/translate-all.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 4df26de858..5cc01d693b 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -1428,11 +1428,10 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
max_insns = cflags & CF_COUNT_MASK;
if (max_insns == 0) {
- max_insns = CF_COUNT_MASK;
- }
- if (max_insns > TCG_MAX_INSNS) {
max_insns = TCG_MAX_INSNS;
}
+ QEMU_BUILD_BUG_ON(CF_COUNT_MASK + 1 != TCG_MAX_INSNS);
+
if (cpu->singlestep_enabled || singlestep) {
max_insns = 1;
}