From nobody Sun Nov 24 08:10:28 2024 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=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1726073510; cv=none; d=zohomail.com; s=zohoarc; b=hfS0p5afZz99mSkklwfMOqKhPHdvIMdEo2ZWIHppAmgJMV4JhhFxRTwWc0BBl8ykGWOJ7hIi/oyl9n//PNfCze/otbm3er0u+91JDGXzFXIfutYhWA5tj1yFW+amRrJvjkWZ7/HAgTHFmpQH9w94oiGICddmA7B59IlvnI15PaY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726073510; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=E4LfLCCfd77AE3gIUDkv8zMuzeAX8OHemsoCsp4r7PY=; b=IQzK47IpFdfvOtCTU4mnEFkuutWhjfc7ROiprrlkvcOsl/ImIPVYo/m63FZDOILf/L0JVkedIawmj2q1VKB475qjID5ST0za4qU7DBIRReOzzII9xkMJaGvjknkKHAELDNoEccqYZIWNKWx2l6lGuDvKkL4M2AZw2fEwy6oDuaU= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1726073510106958.888700070767; Wed, 11 Sep 2024 09:51:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1soQYR-0001xC-TX; Wed, 11 Sep 2024 12:50:55 -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 1soQYQ-0001rn-Al for qemu-devel@nongnu.org; Wed, 11 Sep 2024 12:50:54 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1soQYO-0003eC-8M for qemu-devel@nongnu.org; Wed, 11 Sep 2024 12:50:54 -0400 Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-7db174f9050so30642a12.3 for ; Wed, 11 Sep 2024 09:50:51 -0700 (PDT) Received: from stoup.. (174-21-81-121.tukw.qwest.net. [174.21.81.121]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71908fe4e7esm3186947b3a.80.2024.09.11.09.50.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 09:50:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726073451; x=1726678251; 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=Yn+TF8iFS0O+5Vw/6QXmmUH33fyrxlY5MKmAAd0rXtonfk0vnzDGqyIkltkk5QouN5 boYtZmp1DvIgu5mAI9MAomgpIUVOlPhDTib9dU1KJg0w7WPr5o30H//e0eK5exx18u3r 0+QDqyKv+ujBeY0QSyECAZxDKNggetU+3OWEwu0gRjsVhmeaLYYW17zc8Gjm5auzVgF2 1g0qH19rmPN9G5Gy6+Gw7n0LlAKtybIdyQ+gcpRGVkEg1B+3lHjY1U3NUzg6vuYMKLvO u5z4d8a69YaNxz9W5e0+rbOLqekxc0OZPiWhnPPyl7GCwxPtRpsuPDybomRq7w6hEOxj ojig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726073451; x=1726678251; 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=d2QYW8iM4zZ+wPsxa64iApYMb1vl8mBjShbyZx6xLTve8jWOK7Zkn9+DBUoFZbDwU0 wxY6kvBz4DhGEbUJ5bi8Joq8kIpeT9GaWHiDM0ZF48NQEzh7AhaugKji3W/ZRNbESsaG 8/kZq2yPcSAPYaH2y7X0+WsJZkbW8xrbDfme14vvShhDLHsSUmh2ZWhMWCgtwA8E+RCb /qXCQxw/fRXUhlnBxiJ+ylTjn7ILCIXK0kekF9tf86nIL/qS+MSzTifVzCzJDAE5B0Yh 8zrGdOc7wdlTvxAykD6qXZ9Moy1bBQyqU0JAMbTwPPTdjch1qfyaLqMwC+jNABUx2TrF Z88A== X-Gm-Message-State: AOJu0Yw7BShFf3FJbUx7ZfJ3YEZFDEn0n3H8ZKFkDFpgq8vaAtMI7hAU 3GFeBIO/ukNkG14PWUoIGQ8lZF6ulv9TXS1x4TDo7SGolK8Keec7Y9LiEhdn92vM2tQbtx3otLk N X-Google-Smtp-Source: AGHT+IFn8LWW0mQbbQ3lncg5aU5yuUvEE2h8vNuPGqorWDXr2WYRJj8jlHkap/m4oOOiC4eA8jjAfQ== X-Received: by 2002:a05:6a20:c70b:b0:1cf:5d45:3b29 with SMTP id adf61e73a8af0-1cf5e1577cemr7790850637.35.1726073450774; Wed, 11 Sep 2024 09:50:50 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: zhiwei_liu@linux.alibaba.com, tangtiancheng.ttc@alibaba-inc.com, philmd@linaro.org Subject: [PATCH v2 02/18] tcg/i386: Split out tcg_out_vex_modrm_type Date: Wed, 11 Sep 2024 09:50:31 -0700 Message-ID: <20240911165047.1035764-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911165047.1035764-1-richard.henderson@linaro.org> References: <20240911165047.1035764-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2607:f8b0:4864:20::534; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x534.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1726073510620116600 Helper function to handle setting of VEXL based on the type of the operation. Reviewed-by: Philippe Mathieu-Daud=C3=A9 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)); } =20 +static void tcg_out_vex_modrm_type(TCGContext *s, int opc, + int r, int v, int rm, TCGType type) +{ + if (type =3D=3D TCG_TYPE_V256) { + opc |=3D P_VEXL; + } + tcg_out_vex_modrm(s, opc, r, v, rm); +} + /* Output an opcode with a full "rm + (index<