From patchwork Sun Sep 22 12:00:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 830122 Delivered-To: patch@linaro.org Received: by 2002:adf:ebcc:0:b0:367:895a:4699 with SMTP id v12csp1553609wrn; Sun, 22 Sep 2024 05:04:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWqH+UIugQdWWYkRX9eJXonxjhcZLUxiaSqe03dgdB0/TbtUB6MTnoK72tvE7CUatzaHx76ew==@linaro.org X-Google-Smtp-Source: AGHT+IEBt2sSFYPvxgK52wT8RPb6Kx8wc+jABLv3Uw3KhQo5xMMLbJgNPZbuj3tP3sD0SUaoZYct X-Received: by 2002:a05:6122:3c4a:b0:501:2851:b3bb with SMTP id 71dfb90a1353d-503e03d8808mr5172686e0c.1.1727006642822; Sun, 22 Sep 2024 05:04:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727006642; cv=none; d=google.com; s=arc-20240605; b=dy6kQYpoBHraTRzswQWIBYfU4bXbd7q34VW6wf4Tk3BHDNw2x/u3hHp9KETv4pnGHH LoAr2YMWpo0AYBkoXj/heBcQ3pPtchw6PlzQfr4YLoVrXU0JD42Vil0hidoslI5teApS rkCFgt+L6ec2I9CF/w58eHDPZ0sk4xbDMdT6XcIgp8Lo8mLLc9JeJcuqdet8R1C9mlWB 03RQV7WkYzHUnGfuOuxmbXnQltM6KWswGGkZ31ReppK/Pf6xsDv0EizXBbQUpRa1/OAu BzTnXQIDUTqVE91QcZ/rePv3+1zN/0MqPeuysIPt2H4o43axfRcO9/IowmCp8Ox1DFhR U9ow== 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=Z2ZjvXoH00iViMW0slYpXozl5B8ORorypWDbC2UouOc=; fh=tTjTfh/QwbpfIJ40uL4jnZOzWTJn3vAziy+Fmyen6KU=; b=KrHwJLwOhPbehpHZLlkXgeTSIE8a0mcMGMx/KAV3Gz/9VELo9Qv8jUq6s0rXZyeFQR PT+HYCkjPke6cvLxWP39AwhP4Fu5td013bH8ncSmUccPsg7dfLE06JZy6e7j3Ku5HKLO dXK5V6cPU+NeZr+FbDwi0yI3ZrzJoRXW/+qdg0+KfaTijSXHllr0ptbe66VO44SnBw5A hffhg2QDGpGzM5NEP/4Mu4vKT9vic1dkvxis/oIdId2hsCHZy26iF/rva+TWVjDxsl1V 5/lSHfYul4LqY5FN+1CQGZ4ZXsKvLZMcAI/p6vfxCCEAsuhI5Acepy2GIUvx+rMBhJgX wlOw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FW4yZx0M; 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 71dfb90a1353d-5035bb52871si3334781e0c.186.2024.09.22.05.04.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Sep 2024 05:04:02 -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=FW4yZx0M; 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 1ssLIQ-0004O0-7v; Sun, 22 Sep 2024 08:02:36 -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 1ssLHP-0000x1-Ra for qemu-devel@nongnu.org; Sun, 22 Sep 2024 08:01:37 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ssLHJ-0002O9-6h for qemu-devel@nongnu.org; Sun, 22 Sep 2024 08:01:28 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5c5b954c359so1133739a12.1 for ; Sun, 22 Sep 2024 05:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727006483; x=1727611283; 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=Z2ZjvXoH00iViMW0slYpXozl5B8ORorypWDbC2UouOc=; b=FW4yZx0M90I7GvgyIyKy+MokEVi+Qw4pMOQCpuFbtHoaadtQSgIqfX/1WCJrpRytr1 EDQPfE7eQbxlcyqITHFVuoXP27dYT7ypmRwXXnThYIhT3ShNuE35YgspXmILqfpbX2Z6 iVOmI/aFPwQAj/P4AaHJbsKZSIDbsvBKzTOv/BqoF7FOeeICOci+A9meNqmLCYXtfRgI TfyNMX93uDxWSYLs4prG8GK3CzPiY+WEXQ2Mcl/9ogAIJ9CxZfkmodGblG7VKPMntETT ess+hOHr65L7bk4Do7KSSM+lx5J5vgrA3hInn1ndoNJP6G6J7yekBXSG1Y6ihwEQF66a 6dXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727006483; x=1727611283; 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=Z2ZjvXoH00iViMW0slYpXozl5B8ORorypWDbC2UouOc=; b=ryVGjv6Uc2d0DKvlI9P5xbVW4IJu8J706RK0PfxVmiC+bd95IYEHG7Bsb4OzI5H/6i pH2zWNegKkkfLYdWpL8U2Qo7rHmUDv0MX9YE/LgU84P7bAff66D+jUHVKs5+LeY7k196 V4dWPsvjiKu4c7JKQb778KYItblQ8aFM8PBQpyw1Ve4ZHhiV6uB3HMDi/xHlunShuO/Y TQxfc+JQY24X+m1v8LD8wsoLTzN6mUWUF64l18sOruiNCoFpRdzCC47EVPXAr0uvha4e P4e0+ZH7T8ZZGFvmOo/W+GcXS+L/W8C//XYSp+zZCfvQxwAQaCbnCeANAG4k09TJFjsK nxQQ== X-Gm-Message-State: AOJu0Yx74TyOUIyA+lNILS5QqudsJFtIRzNlPzjd2/3O+tEk61N4Tl38 cUiXyj52XIgknqJZ/p4s6UTIBpa/OQ437py3dTFtonMm/soDbhaHYlMfJeKGS1rQeBrR8eaubKc WQZU= X-Received: by 2002:a17:907:7b92:b0:a8a:9246:7f57 with SMTP id a640c23a62f3a-a90d4fbcd4dmr1057994666b.4.1727006482864; Sun, 22 Sep 2024 05:01:22 -0700 (PDT) Received: from stoup.. (90-181-218-29.rco.o2.cz. [90.181.218.29]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a90612df525sm1067909966b.159.2024.09.22.05.01.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Sep 2024 05:01:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 15/31] tcg/i386: Add predicate parameters to tcg_out_evex_opc Date: Sun, 22 Sep 2024 14:00:56 +0200 Message-ID: <20240922120112.5067-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240922120112.5067-1-richard.henderson@linaro.org> References: <20240922120112.5067-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=richard.henderson@linaro.org; helo=mail-ed1-x529.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 autolearn=ham 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 Extend tcg_out_evex_opc to handle the predicate and zero-merging parameters of the evex prefix. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index b1d642fc67..f94a2a2385 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -674,7 +674,7 @@ static void tcg_out_vex_opc(TCGContext *s, int opc, int r, int v, } static void tcg_out_evex_opc(TCGContext *s, int opc, int r, int v, - int rm, int index) + int rm, int index, int aaa, bool z) { /* The entire 4-byte evex prefix; with R' and V' set. */ uint32_t p = 0x08041062; @@ -711,7 +711,9 @@ static void tcg_out_evex_opc(TCGContext *s, int opc, int r, int v, p = deposit32(p, 16, 2, pp); p = deposit32(p, 19, 4, ~v); p = deposit32(p, 23, 1, (opc & P_VEXW) != 0); + p = deposit32(p, 24, 3, aaa); p = deposit32(p, 29, 2, (opc & P_VEXL) != 0); + p = deposit32(p, 31, 1, z); tcg_out32(s, p); tcg_out8(s, opc); @@ -720,7 +722,7 @@ static void tcg_out_evex_opc(TCGContext *s, int opc, int r, int v, static void tcg_out_vex_modrm(TCGContext *s, int opc, int r, int v, int rm) { if (opc & P_EVEX) { - tcg_out_evex_opc(s, opc, r, v, rm, 0); + tcg_out_evex_opc(s, opc, r, v, rm, 0, 0, false); } else { tcg_out_vex_opc(s, opc, r, v, rm, 0); }