From patchwork Thu Jul 18 05:40:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2" X-Patchwork-Id: 1961899 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=JXB+Av+k; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WPhVy2hzRz1xrQ for ; Thu, 18 Jul 2024 15:41:14 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 163C1385EC55 for ; Thu, 18 Jul 2024 05:41:12 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by sourceware.org (Postfix) with ESMTPS id 545763858433 for ; Thu, 18 Jul 2024 05:40:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 545763858433 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 545763858433 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=198.175.65.19 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721281247; cv=none; b=u+GqeYh3HtPy2S2x3pXvdr7Y0zDrP0sOCqXoOTaWODxP4eAgIxnBmc625F4VqzL2UOFjwhAP7qRlezwrQxjXxIwdtaZXc4vc8uhGqfcpaYPPBh/OO6GOQmHCki5LFjEscSBciDS19UrSsM2mXNL3cUWeDNzsDcpPHM8im3PIASA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721281247; c=relaxed/simple; bh=G/rFip8CY0PS/e1ZonJVXhnamKZ1Y8gm/VsUrdpmcgE=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=MhI+es1xQrWt9RAQ/RGzBdmW7lWIi9QQavp/etDm2I7wjVVmJT7Y3TqrFrMDx6YX9xPjO4c8+MVCoLkQtmnkpTlp9iDHF/aU6W8aBdAa8KDMXPpLyd4+EHmKL1sbnkw+qbRAbdW8xPojuDn/2dVv9Nj9JPrWS9DEGKtKMt1WCqE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1721281245; x=1752817245; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=G/rFip8CY0PS/e1ZonJVXhnamKZ1Y8gm/VsUrdpmcgE=; b=JXB+Av+kxD/C54NTs+dOugnzLm8oZc3VEW2JZGYQcG/OL/VrFe1UGwc9 Hlox/p161aTpNU6v4bQ7C+qKdXJN/R+jzg3h68Jsh4CTlGsoO7NhDpdLZ HDB7oqMVhsxDpo9SWS/wEc85dgQIfcAgVJpj7HeqQXZSXrRfApUJjxiiV TJZm1hjN8MQ4cnlAshCbZOkD6aLWkyKEn0ZupMSvtZYiPCyJfHhzMAy0J R3VJ+N63HRdccMt6RrbeoDti0byF2T2hob9lcBzOfbxauO1+tzZbRVQ54 DlNQrBdqIv0xqGPjGlksbwppO0StrmvwTXNKxlnjeOiKllCEdHRsQtDud A==; X-CSE-ConnectionGUID: 3bGU7p2mTyaAxb1UR+4nZA== X-CSE-MsgGUID: UPgTL4pLTnmQCfHVN6g1Wg== X-IronPort-AV: E=McAfee;i="6700,10204,11136"; a="18672462" X-IronPort-AV: E=Sophos;i="6.09,216,1716274800"; d="scan'208";a="18672462" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2024 22:40:44 -0700 X-CSE-ConnectionGUID: OIVZkpOSS9GnvOQIy+7VjQ== X-CSE-MsgGUID: 4+AAmD7JT7KcuraEAizEig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,216,1716274800"; d="scan'208";a="50951103" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by orviesa006.jf.intel.com with ESMTP; 17 Jul 2024 22:40:42 -0700 Received: from pli-ubuntu.sh.intel.com (pli-ubuntu.sh.intel.com [10.239.159.47]) by shvmail03.sh.intel.com (Postfix) with ESMTP id 95BAB100735E; Thu, 18 Jul 2024 13:40:40 +0800 (CST) From: pan2.li@intel.com To: gcc-patches@gcc.gnu.org Cc: juzhe.zhong@rivai.ai, kito.cheng@gmail.com, richard.guenther@gmail.com, tamar.christina@arm.com, jeffreyalaw@gmail.com, rdapp.gcc@gmail.com, pinskia@gmail.com, Pan Li Subject: [PATCH v2] Doc: Add Standard-Names ustrunc and sstrunc for integer modes Date: Thu, 18 Jul 2024 13:40:39 +0800 Message-Id: <20240718054039.1112657-1-pan2.li@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org From: Pan Li This patch would like to add the doc for the Standard-Names ustrunc and sstrunc, include both the scalar and vector integer modes. gcc/ChangeLog: * doc/md.texi: Add Standard-Names ustrunc and sstrunc. Signed-off-by: Pan Li --- gcc/doc/md.texi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 7f4335e0aac..ecb7f34f1b9 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -5543,6 +5543,18 @@ means of constraints requiring operands 1 and 0 to be the same location. @itemx @samp{and@var{m}3}, @samp{ior@var{m}3}, @samp{xor@var{m}3} Similar, for other arithmetic operations. +@cindex @code{ustrunc@var{m}@var{n}2} instruction pattern +@item @samp{ustrunc@var{m}@var{n}2} +Truncate the operand 1, and storing the result in operand 0. There will +be saturation during the trunction. The result will be saturated to the +maximal value of operand 0 type if there is overflow when truncation. The +operand 1 must have mode @var{n}, and the operand 0 must have mode @var{m}. +Both scalar and vector integer modes are allowed. + +@cindex @code{sstrunc@var{m}@var{n}2} instruction pattern +@item @samp{sstrunc@var{m}@var{n}2} +Similar but for signed. + @cindex @code{andc@var{m}3} instruction pattern @item @samp{andc@var{m}3} Like @code{and@var{m}3}, but it uses bitwise-complement of operand 2