From patchwork Sun Sep 22 12:00:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 830128 Delivered-To: patch@linaro.org Received: by 2002:adf:ebcc:0:b0:367:895a:4699 with SMTP id v12csp1553969wrn; Sun, 22 Sep 2024 05:04:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXQibVZPwrxckTdo2BbLca3+xWa9BFYsZ4gYZEi0tsbgX8imqKCoMieFojR/zhMJ7T8dPlj1g==@linaro.org X-Google-Smtp-Source: AGHT+IHZBO5gcVsCZr6eBR6rYFXbG4FViaEugs2SJsKsdqbFtyCtLUEWkHso2btnTLavTjVUqTts X-Received: by 2002:a05:620a:44c1:b0:7ac:ab4e:f0df with SMTP id af79cd13be357-7acb809a3bfmr1728153185a.7.1727006695352; Sun, 22 Sep 2024 05:04:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727006695; cv=none; d=google.com; s=arc-20240605; b=Ys8Ikm9qZe8pZB2u/jphevUgLmVnabvgiVO/sPEhSmVWH5ovo6kClG40BarBbZQlhI i+/h9uvM9ghyBuDhFHGKzvNUKaTRqb6l9UdTuQEPh1KTWq6hNJNVngvw+kyWqtQrkMQ0 ypxBEmxVEj4LybnjXJTMlyaJn05q1lW4rHng+qBzTO+w4bpkmINtZ52h/YCW4CAEdO+k aPPXMEfcEkjc0ER5l0fK1OdkFLwSFvcfjzvjPAsNkqh0cTQLKMXg9vYHwiRSby8srbQR qam5ToMluve64ufZ3/x0FXis1OZyiAtyB3STnq9clUuTolYu6an0I2O+XdUcOmJa0lxj HGGA== 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=E4LfLCCfd77AE3gIUDkv8zMuzeAX8OHemsoCsp4r7PY=; fh=tTjTfh/QwbpfIJ40uL4jnZOzWTJn3vAziy+Fmyen6KU=; b=ke+GBWX2FO3O12DujLUmui3D8jxjFyib8OTXHVZXR+M28CKncsx9K8wkoLawVdxSA0 eqEqde/oaKCykC7HP0PDX1Ae+rEIduT5mz5LTfEV3w6lNoxuDHEg0uXSNpQdX3Od4jCP jDooN8DY14hzeVsogdXEIdpTR7RHJDbDStx88mE9VIIGc2NA/zQsX6gc3YyrLh5ImsIT JUo18tedTPIoJKdR4F0wFBfIgE4jzBKbzk8Qv4mnGC9ROr6u7ULZ9IWuwnatz43GxbFS FvEBeFihnSzAR7ShT6/xpmpED170ojqbpTvcB2kbNCuFg6+eBzVakOSqiOWt1h/VloDL gj9g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RSn+J0wv; 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-7acb09111d3si853095285a.709.2024.09.22.05.04.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Sep 2024 05:04:55 -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=RSn+J0wv; 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 1ssLHg-0001iG-Bd; Sun, 22 Sep 2024 08:01:48 -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 1ssLHG-0000vD-Sg for qemu-devel@nongnu.org; Sun, 22 Sep 2024 08:01:31 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ssLHC-0002Mp-IP for qemu-devel@nongnu.org; Sun, 22 Sep 2024 08:01:20 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-42cbface8d6so43740145e9.3 for ; Sun, 22 Sep 2024 05:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727006477; x=1727611277; 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=E4LfLCCfd77AE3gIUDkv8zMuzeAX8OHemsoCsp4r7PY=; b=RSn+J0wvmayXtIcVp/+A6jmihR0qEOjB3jhZa3pnMpCydvZW+n3PTOxHGixwLwwC6o 3X2DpD0g4Z380ePz+lHdoBS7YgXfjr3RDGEmsmemI+kVXpyhxhk+L/fWY+S02Zs75vBx 3cBBg4qCO8lhJHLutuuRd6mg/cLjExjaNqQLSl95wB/hVLEuwVNMAGE6T07zCv4TsbY9 8U6tesy5L68YVCMWWA2sUQycsO36h7HEcnD5WxdhHB7/Rsjg470Tq1u6Na1xuehibmR1 v2t7jKnjVlJd4PJrd8mPSvOMcqfzjpj4AhDAEjZC9ERJGL5eUqTpA/y1+2HJ3S7VBShK DzFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727006477; x=1727611277; 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=E4LfLCCfd77AE3gIUDkv8zMuzeAX8OHemsoCsp4r7PY=; b=K7zNd09ktyoUP0TDeP64lRlWxyF5zWjKbeOEsix4lg4n2ozW5vuNh2GT35eKRjRAWC Wv/Ds6h4ZMLe+AUHoJWOOWR/XOPVAeFMVR3ihIxfLonaG1vMN5W0wPv1NChjlCbfrO2r 0Y5XXn1pohIuZRyEMw7L5R0QuODwJYJYFVzLNzOGsUHtpaZmdE4KKq5oWXqGBPWg59h+ IBShPQQtrfMdLBEHLeIg70U1w5VOJHrpHgGN6EZ7t7MwQriZfmatvRdcrh0Ime03XAij IYNeOKfUHhAZZ5R1AZH1VDKa3J19EFUV/1CDigkRptS8IyDhL8t0p69JQ2H3wYed6X8d FB0Q== X-Gm-Message-State: AOJu0Yw2W8FpxHhUneQl09lHFjopIMYdwpNKs6h5j4ZCSPDgZvfZnUK1 aAfVQE9i0aE6UPDd3Uh4w26z89cpJQsmVsieeqtQXSkRG18/9GQxxY2rQ/GPt42wAg+EDbaH5y7 ormI= X-Received: by 2002:a5d:4fc5:0:b0:374:c8eb:9b18 with SMTP id ffacd0b85a97d-37a422c63acmr6655461f8f.24.1727006476698; Sun, 22 Sep 2024 05:01:16 -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.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Sep 2024 05:01:16 -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 05/31] tcg/i386: Split out tcg_out_vex_modrm_type Date: Sun, 22 Sep 2024 14:00:46 +0200 Message-ID: <20240922120112.5067-6-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::32a; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x32a.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 Helper function to handle setting of VEXL based on the type of the operation. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index 9a54ef7f8d..af71a397b1 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -711,6 +711,15 @@ static void tcg_out_vex_modrm(TCGContext *s, int opc, int r, int v, int rm) tcg_out8(s, 0xc0 | (LOWREGMASK(r) << 3) | LOWREGMASK(rm)); } +static void tcg_out_vex_modrm_type(TCGContext *s, int opc, + int r, int v, int rm, TCGType type) +{ + if (type == TCG_TYPE_V256) { + opc |= P_VEXL; + } + tcg_out_vex_modrm(s, opc, r, v, rm); +} + /* Output an opcode with a full "rm + (index<