From ac81b38d8938fd12944ac0b7bf06123c49ee2058 Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Thu, 17 Sep 2026 20:20:19 +0100 Subject: [PATCH] Fixed I386 64-bit shift of structure members --- i386.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/i386.c b/i386.c index f9e9334..bcdc45e 100644 --- a/i386.c +++ b/i386.c @@ -26376,6 +26376,16 @@ static void emit_load_assignment_rhs_expression_to_pair (const char *lo, const c emit_push_reg_now ("eax"); emit_push_reg_now ("edx"); + /* + * The left operand may have been loaded from a 64-bit structure + * member, leaving postfix_member_seen set while its address was + * consumed by the pair loader. The shift count starts a new + * operand, so do not let that stale member state make the 32-bit + * RHS loader dereference the count as though it were the previous + * member address. + */ + postfix_member_seen = 0; + emit_load_assignment_binary_expression_to_reg ("ebx"); if (state->syntax & ASM_SYNTAX_INTEL) { -- 2.34.1