From patchwork Tue Oct 15 14:17:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 835441 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c8f:0:b0:37d:45d0:187 with SMTP id z15csp261712wrs; Tue, 15 Oct 2024 07:20:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUcM6Pr3gjiKvkxPX9ls/0Pvy/GNzBmbaMLdU2EcwMPTGT7Np0XRXtwAAGAxnd2gXz9GkaIUQ==@linaro.org X-Google-Smtp-Source: AGHT+IGtJNoEKecaY50SEStzeX5X9iLPEgPaQV43N7H/R7W1OJaIsLOOwiyefuDoXZJ5KTvubsLv X-Received: by 2002:a05:6214:5913:b0:6cb:f0ec:b31e with SMTP id 6a1803df08f44-6cc2b919926mr10630616d6.42.1729002038836; Tue, 15 Oct 2024 07:20:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729002038; cv=none; d=google.com; s=arc-20240605; b=CbLJ+xvHd8LXOPwPk6KXr6qSXdAJGrd6vUQ0hrj+sm5DF+9NvAn8HGSsMEoIagD6r2 JiyydT+qYuMdLkS3Q/ZbeB9MPZVltivHPG69DqJfzMQWwjg5e+wJ4cLHDR/32fGSSY+1 TNGkg1PqIC2/Qwwe/VJ2a1atmV1Y6diCgChKVQfE81tlXgEvLVBXYaA/jTZhFJENE3k7 LPOueb6joK7nV+ItiA2p9OGyg6WNo8C72ItDlGFGYGnLdZkrNLXXBvDWxDNID3zOElNP SXtBeZk81qvvWpfH8NyHRmGFS1vUFs6SlNLel3viwfv+h9KuDq3WOG61DJNC9nBtY9V8 gXng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jtLc0lpCek67EOsSAqPMkd8exLr9Xv05gXgeBpMusKM=; fh=VjvH2dnEqcO4/q63J5z14goRKEsM9S8mfNHbNHV7E9o=; b=evecRWba3C44I7fgp8qAWy37bdLfZ6hagtFFPvZBRSumbSCOX4JPZGQ6QiGtGGp4By HGZejj2g5PLdH/sAoAxPpbtzCKPHdnz1fSzIJ+eA1W91A3Sjq6L3/NGFIc38NhwKafp6 JDZqp0+yXCWhX6F2yRaJ0Dn/9ZE5cHBAe6kBI75JSH4UYMGBVx1uxiRoCOG0I4bzDQdO RwpBGEWta4j1QaeGkNEJ+RBG/XmKFJmV25tyx96FdFC5Mf3f+nVZRvf0vtb+6IBUcNW6 gSqsyQWjg0YAecd02LrNOzge0hyO0VTbLBGEWuWMVkUzgiUsahsgE/Zbwu+ooPWR7Yce kZ5A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gvBQfyHr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6cc22a2d061si14989936d6.297.2024.10.15.07.20.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Oct 2024 07:20:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gvBQfyHr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t0iNw-00009t-5Z; Tue, 15 Oct 2024 10:18:52 -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 1t0iNn-000838-BU for qemu-devel@nongnu.org; Tue, 15 Oct 2024 10:18:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t0iNl-0003P2-II for qemu-devel@nongnu.org; Tue, 15 Oct 2024 10:18:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729001920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jtLc0lpCek67EOsSAqPMkd8exLr9Xv05gXgeBpMusKM=; b=gvBQfyHrE19Io1zpYTfjz3xYLkSLbYancoOmonaWZ09G9SKhshBEA+DyNEn76cYuHeKV/g 3VPXSIZn6GdUQ+SaslspaZcuLfqLSKe7ps3NlPHyHNn/q2SqQlTACTRvHBlNUKIL7PoOmF fBdw6ILHs3UVFgYeQARqYpGtqO53MLM= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-176-iC5cgFSyO4qxx4lcWMuhvg-1; Tue, 15 Oct 2024 10:18:38 -0400 X-MC-Unique: iC5cgFSyO4qxx4lcWMuhvg-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-37d59ad50f3so1419894f8f.0 for ; Tue, 15 Oct 2024 07:18:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729001917; x=1729606717; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jtLc0lpCek67EOsSAqPMkd8exLr9Xv05gXgeBpMusKM=; b=RMMFEV0Q3qOvxJxJGaYYfl83hQmpxx0lIfO684ZgntMIwULVVyLYJWB6dnQgT8hk/S hTHeJLEKMnZDirMBSTc8GWCZw8vDKBAvKdwbHJ2Kk2Msdra7c1OYNFrK4TDD039hWf1C 1vQo4zyDSe0zgHE5Wo7s3PCgEvl6UUIgCQSOkpG8VYlkPlSTAeUoYSJAJ2AUsm6uJd3m MVmxHRGOxtQeJpg9mEAV9W3UX9/4zwEJmvTBZaAp95TNZT5JGwMoQvRSZayQ6TX/F7m5 EGz1vU6qoVHLuyorWo2vmiI+kOQXv9ayrfG3vpvygoTwswaKmnav/Ux68c5SDAr3cKwR 8knQ== X-Gm-Message-State: AOJu0Yz65OYZAJrgNhHJAnKLqcJFzTZ8arjfL9uDqRJHOIR6Nh1FZZMq n2So0lnGbBsfu96Z1TtFaiHOG5b9o/jON3kX5nJQz9HELnwI2N/hhXkXGo8QI+GQZ58u+N+DDbH TmNQnytoTyK9cPGdxCmd6nwomg0Tx/t5Pn8cuLH7Hx5eJIvF8IOFpEPedWON8W+8QB/o+lqWRdz PcLPBdRzjGy4c1Bo0VJhuDZ6e0GHltw6JmHw16ODQ= X-Received: by 2002:a05:6000:50f:b0:37d:43ad:14eb with SMTP id ffacd0b85a97d-37d86bb9d5cmr324987f8f.14.1729001917142; Tue, 15 Oct 2024 07:18:37 -0700 (PDT) X-Received: by 2002:a05:6000:50f:b0:37d:43ad:14eb with SMTP id ffacd0b85a97d-37d86bb9d5cmr324972f8f.14.1729001916740; Tue, 15 Oct 2024 07:18:36 -0700 (PDT) Received: from avogadro.local ([151.95.144.54]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa87c44sm1683541f8f.33.2024.10.15.07.18.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 07:18:35 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson , qemu-stable@nongnu.org Subject: [PULL 25/25] target/i386: Use only 16 and 32-bit operands for IN/OUT Date: Tue, 15 Oct 2024 16:17:11 +0200 Message-ID: <20241015141711.528342-26-pbonzini@redhat.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241015141711.528342-1-pbonzini@redhat.com> References: <20241015141711.528342-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.063, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson The REX.W prefix is ignored for these instructions. Mirror the solution already used for INS/OUTS: X86_SIZE_z. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2581 Signed-off-by: Richard Henderson Cc: qemu-stable@nongnu.org Link: https://lore.kernel.org/r/20241015004144.2111817-1-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.c.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc index 487c376032f..1f193716468 100644 --- a/target/i386/tcg/decode-new.c.inc +++ b/target/i386/tcg/decode-new.c.inc @@ -1706,9 +1706,9 @@ static const X86OpEntry opcodes_root[256] = { [0xE2] = X86_OP_ENTRYr(LOOP, J,b), /* implicit: CX with aflag size */ [0xE3] = X86_OP_ENTRYr(JCXZ, J,b), /* implicit: CX with aflag size */ [0xE4] = X86_OP_ENTRYwr(IN, 0,b, I_unsigned,b), /* AL */ - [0xE5] = X86_OP_ENTRYwr(IN, 0,v, I_unsigned,b), /* AX/EAX */ + [0xE5] = X86_OP_ENTRYwr(IN, 0,z, I_unsigned,b), /* AX/EAX */ [0xE6] = X86_OP_ENTRYrr(OUT, 0,b, I_unsigned,b), /* AL */ - [0xE7] = X86_OP_ENTRYrr(OUT, 0,v, I_unsigned,b), /* AX/EAX */ + [0xE7] = X86_OP_ENTRYrr(OUT, 0,z, I_unsigned,b), /* AX/EAX */ [0xF1] = X86_OP_ENTRY0(INT1, svm(ICEBP)), [0xF4] = X86_OP_ENTRY0(HLT, chk(cpl0) svm(HLT)), @@ -1853,9 +1853,9 @@ static const X86OpEntry opcodes_root[256] = { [0xEA] = X86_OP_ENTRYrr(JMPF, I_unsigned,p, I_unsigned,w, chk(i64)), [0xEB] = X86_OP_ENTRYr(JMP, J,b), [0xEC] = X86_OP_ENTRYwr(IN, 0,b, 2,w), /* AL, DX */ - [0xED] = X86_OP_ENTRYwr(IN, 0,v, 2,w), /* AX/EAX, DX */ + [0xED] = X86_OP_ENTRYwr(IN, 0,z, 2,w), /* AX/EAX, DX */ [0xEE] = X86_OP_ENTRYrr(OUT, 0,b, 2,w), /* DX, AL */ - [0xEF] = X86_OP_ENTRYrr(OUT, 0,v, 2,w), /* DX, AX/EAX */ + [0xEF] = X86_OP_ENTRYrr(OUT, 0,z, 2,w), /* DX, AX/EAX */ [0xF8] = X86_OP_ENTRY0(CLC), [0xF9] = X86_OP_ENTRY0(STC),