tcg: Fix opcode dump for bswap
We use an array of char for bswap_flag_name, so some entries in the array are non-null but empty. Check that. Fixes: 587195bd590 ("tcg: Add flags argument to bswap opcodes") Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Richard Henderson committed
Jul 30, 2026 at 15:37 UTC
3f3a1ea472d1fc25ecf70087e0a33e57c7f191f4
1 file changed
+1
-1
tcg/tcg.c
+1
-1
@@ -2957,7 +2957,7 @@ void tcg_dump_ops(TCGContext *s, FILE *f, bool have_prefs)
2957
if (flags < ARRAY_SIZE(bswap_flag_name)) {
2958
name = bswap_flag_name[flags];
2959
}
2960
- if (name) {
2960
+ if (name && name[0]) {
2961
col += ne_fprintf(f, ",%s", name);
2962
} else {
2963
col += ne_fprintf(f, ",$0x%" TCG_PRIlx, flags);