From patchwork Mon Aug 12 02:58:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 818568 Delivered-To: patch@linaro.org Received: by 2002:a5d:5711:0:b0:367:895a:4699 with SMTP id a17csp1180850wrv; Sun, 11 Aug 2024 19:59:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXa/rjkxgRbgxnrAO/umQwkrOvvRsKUdMssEBob7CEurra6g3CmYMl11ifwXupUWqoEa7cW2v+kZDpT+cwAftbG X-Google-Smtp-Source: AGHT+IFZhKgA0Ks8wDEaDJ+U9I3ZVzw55fN3AwQJW0vFkWrFygW17bTrDmsUAEgr/45yDRPOxG13 X-Received: by 2002:a05:620a:3944:b0:7a1:c40c:b1d2 with SMTP id af79cd13be357-7a4c17b6adfmr985185285a.20.1723431587159; Sun, 11 Aug 2024 19:59:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723431587; cv=none; d=google.com; s=arc-20160816; b=qXp4+7wrLC3Hpm4fa3nzbd+JjBbjTkpDnV+6H3AsHEj9aQJ5ktVq/Dwrdo9rY8Dbxu WtvVXudd6l3fAA+0rcbsefXki8qesDkaGHQ4sPHJq8tn3Q0phsODT/T7qe9uRXDvseAy yqjUbt953opB3RuPO2cLNHurB5bacT2rPNjUNs0e0dLlChqJH8w0jiloARLtvcB75YNq 6rztEINBvKVY5i6VBI4icpy6xpQ3hXn1p4rW1M4Tlp50WYGHfPajdM4ExQQuciyVpZfq yG1UmMIwkuphXYnJcZcGcU6bo5It2FmM+qMLoBnCsbXXxrUYj8Jv1ucp2X95yUdvEikk YFOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=uTnoluISZ2MwVzhPbDJiXvg9KVOpgY1wyPYE6S/EINo=; fh=LwDP/qXSX6VebDPKubvxV8X7/DhIYH94KKlkosMp5V4=; b=lUN3DbDl16afoOa1+v1lrBX84TvAPhXgK20jWsjUJtRSYfj6T9jpbC3/BZDV5P1Q+s N0iYle0YwY6mX0+Ttj7PBA/qCDTsa/3QuoKagpiGPn5ArtNh5ttg1JDBqTQx7giP02yv iyrwcQw2r6kUvcCcVlsc4Pyt+WcVZm9OH06oqtvknruOVTJIwZHooP3WNVHE55GQjlXd K0dNQUAMarcT+mk0Do6+9nKo83NF9iPy+NAck6cuYOoSVgHxnWzOpNxp+Nfcqk7FDh4L yO01OKHafZ97fz5pIa8qQl2mM+6eb1q6GhdNHj2ufT5HRkvKCeFvEcwIZxyXeuYo5jnE Wl0Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fjxCcQru; 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=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a4c7e237ebsi530884185a.708.2024.08.11.19.59.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Aug 2024 19:59:47 -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=@linaro.org header.s=google header.b=fjxCcQru; 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=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdLGs-0004OO-5V; Sun, 11 Aug 2024 22:58:58 -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 1sdLGq-0004Hf-BJ for qemu-devel@nongnu.org; Sun, 11 Aug 2024 22:58:56 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sdLGo-0003em-JL for qemu-devel@nongnu.org; Sun, 11 Aug 2024 22:58:56 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-70d1fb6c108so2690617b3a.3 for ; Sun, 11 Aug 2024 19:58:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723431533; x=1724036333; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uTnoluISZ2MwVzhPbDJiXvg9KVOpgY1wyPYE6S/EINo=; b=fjxCcQruuUVdQseaoTzlwptQeVoVQxjpVkCLNO9z9roGao3Lx5dyxbONt/7PngZPio LRMRQwocq4EOzHf7OwzluKznbaT4fZsiE/+kZ83o5VH9DrOAjVkxK5lhEbGJBuOXJoMc OwHIgTyk2EF8FZ92aBUobrClVylyoKqxNHj8HRWQHox9Ubyvtc43IM23eQlBOmnvHfxK gcQyrDK1t3ZeDsQqXQlbtjlyggv5dSV7Sn9jpl27fKzKHJGMv5P5PYBHUM108lYWoaPv PZvwTpaeYlXET3S6ztpPxygkvmHCMH2NrI4Oq7V5pSuALjnOLv3Jynr635MAuDIfcee6 mSIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723431533; x=1724036333; 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=uTnoluISZ2MwVzhPbDJiXvg9KVOpgY1wyPYE6S/EINo=; b=Go8PT91Tcx6qO31qJ+UbTMHUn01BaQYRfXXmz4RsY7t57D+jio8mmyGJx7IYrpZF5u kMI9xYFScWey9HbEAB05sIfC8/sZTlJBpMqSvri7zkaKmAiUMukHEg1Cfl8LblNjTWGl F9w2SMBKpMYMzCGuutO7y9iGx1hPYpEsgg50m1DXkjbixxypnb5UV4HJHPQXMqJLP+Kd EVeXExj4Y2zNGM4nvqbS9SP02ySGNfLF3i24vfheJ+Ny25kNPkpRMIH8QmCS+xHodFcs tFml8d18Pcn9kLEUlPdlpi/K6RIV8NBlWTCqEWbPmG7pvYlSOYUJsqgr5cLRlQvz+vtj plVw== X-Gm-Message-State: AOJu0YwnOd40gcJQGaHR79sI2GsHvCOVOiD+yBXoxQilzkW1nTBiWH1l TOvOh13qWwHWEToOsxe1RoPPFy+AbIr7bK5YsuX89ZtN3GjXECeX1eFtMK1VNKeGiXUavYJ1zaK rork= X-Received: by 2002:a05:6a00:23c7:b0:706:284f:6a68 with SMTP id d2e1a72fcca58-710dcaecfb3mr6227691b3a.23.1723431532714; Sun, 11 Aug 2024 19:58:52 -0700 (PDT) Received: from stoup.. ([203.30.4.111]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-710e5a43b49sm2984841b3a.100.2024.08.11.19.58.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Aug 2024 19:58:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, qemu-stable@nongnu.org Subject: [PATCH 1/3] target/i386: Do not apply REX to MMX operands Date: Mon, 12 Aug 2024 12:58:42 +1000 Message-ID: <20240812025844.58956-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240812025844.58956-1-richard.henderson@linaro.org> References: <20240812025844.58956-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.google.com 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_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 Cc: qemu-stable@nongnu.org Fixes: b3e22b2318a ("target/i386: add core of new i386 decoder") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2495 Signed-off-by: Richard Henderson --- target/i386/tcg/decode-new.c.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc index b22210f45d..03138b3876 100644 --- a/target/i386/tcg/decode-new.c.inc +++ b/target/i386/tcg/decode-new.c.inc @@ -1979,7 +1979,10 @@ static bool decode_op(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode, op->unit = X86_OP_SSE; } get_reg: - op->n = ((get_modrm(s, env) >> 3) & 7) | REX_R(s); + op->n = ((get_modrm(s, env) >> 3) & 7); + if (op->unit != X86_OP_MMX) { + op->n |= REX_R(s); + } break; case X86_TYPE_E: /* ALU modrm operand */