From 90c6e7d3d732a8b4f28d4632980cf5873e674505 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 14 Jun 2026 00:01:49 +0200 Subject: [PATCH] Fix compile issue in VEX/priv/guest_amd64_helpers.c with GCC8 GCC 8.5.0 doesn't like a direct variable declaration after a case statement. priv/guest_amd64_helpers.c: In function 'amd64g_dirtyhelper_CPUID_avx2': priv/guest_amd64_helpers.c:3653:10: error: a label can only be part of a statement and a declaration is not a statement Create a block for the case statement to declare the variable. --- VEX/priv/guest_amd64_helpers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/VEX/priv/guest_amd64_helpers.c b/VEX/priv/guest_amd64_helpers.c index a516e498b..2fc532868 100644 --- a/VEX/priv/guest_amd64_helpers.c +++ b/VEX/priv/guest_amd64_helpers.c @@ -3649,12 +3649,13 @@ void amd64g_dirtyhelper_CPUID_avx2 ( VexGuestAMD64State* st, case 0x80000000: SET_ABCD(0x80000008, 0x00000000, 0x00000000, 0x00000000); break; - case 0x80000001: + case 0x80000001: { ULong ecx_extra = 0; ecx_extra = hasLZCNT ? (1U << 5) : 0; SET_ABCD(0x00000000, 0x00000000, 0x00000001 | ecx_extra, 0x2c100800); break; + } case 0x80000002: SET_ABCD(0x65746e49, 0x2952286c, 0x726f4320, 0x4d542865); break; -- 2.47.3