From nobody Sat Nov 15 10:54:40 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=fnord.at ARC-Seal: i=1; a=rsa-sha256; t=1752615743; cv=none; d=zohomail.com; s=zohoarc; b=LKaRP5Sb3M0R4FFLndDl+CLHA8FvyYjyxpElA58c9ZP1Y3t1exsABpy9YurMflWQrr2aqYj5Ail2pU5tyFDcD6q22FsquvpyMz+pAvI+tXEj+ht03XNXFsbSmpoSBvmZBHrVFtodzuhvBk2a9slfTPI/fxg+4v2pJ9qkmOMeCn8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752615743; h=Content-Type:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=nqRODQnCTZFf+7j4bEqHoXN6tAx9rstwKcdeI+QQ1cI=; b=XsTI6BfyS9isk9SB/qPc+ATaJCqjpvO0fghUU35p3KBcqd21XqlKzOVdcn8oZp9SgbXzKRvunoMr6HnaiHxzNKkiClaLGl3/5TLTtTs0cuPQp+EPRbdQkTJCgt+DCTIZc8rCMH0xXjHmXy5rz6WKjeQLB6wVoNicMU8fqRYJIMA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1752615743073789.2888495879566; Tue, 15 Jul 2025 14:42:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ubnP6-0006yZ-NW; Tue, 15 Jul 2025 17:41:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ubmo3-0000E2-1q for qemu-devel@nongnu.org; Tue, 15 Jul 2025 17:03:20 -0400 Received: from fnord.at ([144.76.62.99]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ubmo0-0005QL-GL for qemu-devel@nongnu.org; Tue, 15 Jul 2025 17:03:18 -0400 Received: (qmail 1583 invoked by uid 1000); 15 Jul 2025 21:03:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=fnord.at; h=date:from:to :cc:subject:message-id:mime-version:content-type; s=default; bh= uBOpaoUvyajU2bqgrgdrTUy/GQtEq8gw6Zo3TWG2Hkw=; b=wAiQy9wgmd27wJNN MUvZAU4PhNYqOib5tx9kxhrCjqeEGw1QYm9GNTqJGsn3KMHPF2BfwlNwhhEa++eX Vum5AV8/fwd2BzhEu0nIK92DaYYxvQ+B2bkXPD1Mx6iHXiDyfMQ3Ui357uuESlG0 Gg6kYUPicn7WetMhTEP2JiSCvLc= Date: Tue, 15 Jul 2025 23:03:07 +0200 From: Thomas Ogrisegg To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson , Eduardo Habkost Subject: [PATCH] target/i386: fix x86_64 pushw op Message-ID: <20250715210307.GA1115@x1.fnord.at> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=144.76.62.99; envelope-from=tom-bugs-qemu@fnord.at; helo=fnord.at X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 15 Jul 2025 17:41:29 -0400 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @fnord.at) X-ZM-MESSAGEID: 1752615747744116600 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For x86_64 a 16 bit push op (pushw) of a memory address would generate a 64 bit store on the stack instead of a 16 bit store. For example: pushw (%rax) behaves like pushq (%rax) which is incorrect. This patch fixes that. Signed-off-by: Thomas Ogrisegg --- target/i386/tcg/decode-new.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.= c.inc index cda32ee67..3892ec374 100644 --- a/target/i386/tcg/decode-new.c.inc +++ b/target/i386/tcg/decode-new.c.inc @@ -1541,7 +1541,7 @@ static void decode_group4_5(DisasContext *s, CPUX86St= ate *env, X86OpEntry *entry [0x0b] =3D X86_OP_ENTRYr(CALLF_m, M,p), [0x0c] =3D X86_OP_ENTRYr(JMP_m, E,f64, z= extT0), [0x0d] =3D X86_OP_ENTRYr(JMPF_m, M,p), - [0x0e] =3D X86_OP_ENTRYr(PUSH, E,f64), + [0x0e] =3D X86_OP_ENTRYr(PUSH, E,d64), }; =20 int w =3D (*b & 1); --=20 2.39.5