Message ID | 7e28ba70-d18d-13ad-78bc-6e97ea6796a3@suse.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp987720vqx; Thu, 3 Aug 2023 01:10:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlEgEelm6JspZUQBbKmybC7M0Fq/abdE7nSwuU7idIbabE2Vy/pUNBWp95RqMtXD7/oGJF/2 X-Received: by 2002:a17:906:32c5:b0:98e:370c:be69 with SMTP id k5-20020a17090632c500b0098e370cbe69mr10486514ejk.6.1691050248263; Thu, 03 Aug 2023 01:10:48 -0700 (PDT) Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id i20-20020a170906115400b0099b49483261si1835853eja.311.2023.08.03.01.10.47 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 01:10:48 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=F2FmoTcs; arc=fail (signature failed); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 14AEE3857835 for <ouuuleilei@gmail.com>; Thu, 3 Aug 2023 08:10:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 14AEE3857835 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691050246; bh=/TM2maCFZy4enYaeMft2JW//xjNwCi1wrX4/FI7pxo0=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=F2FmoTcs0symevGidy0F5B3uqwxroJpCq0ZAXyDu79pnPx/J+6YxFZIKvKU2+v63V Hk4zfcJ97Il+Bp7XIXrmK6wmJ6PbsudRbDUCJNbAEnS0rIDJLg9pFAGWKVKKr1niBD 4uw9Z6r0N0MRxj9VnMv9Lry7qpyXazYLnQvO6VKc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2052.outbound.protection.outlook.com [40.107.22.52]) by sourceware.org (Postfix) with ESMTPS id 5928E3858421 for <gcc-patches@gcc.gnu.org>; Thu, 3 Aug 2023 08:10:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5928E3858421 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F8zDUBZA3LuMcJn8V0r/mD8e+CMcsD6qdr1fY2VVnVfFK9q0YRUhMuE4txO8kvnmfs4SN3j2SC/BWGx1LdnFtSJEnLS/EBYPvxRTEhXEiP/Q8zx3WjPTHoNNedN6WAUAsBmbVHbzWlZU7Up/U9utxrbqnh/if9MVu4DqNc3n0uEqu15nP4CxSpvkW2GraEOtDjxH9VjUSC3l+XumisybjdOBvtprnMy3iwzooQwjUt1UHXYX1ruz4OZIQwYzq3gNnnZcxxqGXJBDinCCb/FYXIlHd3K68WdUVEHc5oz+UYs2b2w8JydqYKxBsC9cIf2oUPWNQjBKE7dzpvtnJVGKCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/TM2maCFZy4enYaeMft2JW//xjNwCi1wrX4/FI7pxo0=; b=gGDeOxzS8Df1KFvV/sgvPJJIijQgUVk3xj6yU0kyN7pvPEMlYE/iHNTmQGSRuZC02BXJjDJ5SpHhgSFcTigugowJjFjCtAftLVXoQqbswpbtjYaR+ohSy09TNBJkQvdcpV0dR74g6T3yaXI0FiCUMvR5qNFlzMCzDviiJoDy0b910CVk/FDns8PUT3iHMdZYD59ebfMWPZLA1XY+8bJsBzneV7WgZTkIYT5ZYpiG29AW51JdNVkirZuWvD3yiXlSHL62/TdU6WFYXjY2QaCsyzf5eBCnXUzrJnqy7EoW5+2mzj/l5HWQMJAMBOf/pj61PgpoF+G32fl6nSl90qpg2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Received: from DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) by AS4PR04MB9265.eurprd04.prod.outlook.com (2603:10a6:20b:4e0::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.47; Thu, 3 Aug 2023 08:09:58 +0000 Received: from DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::e5cf:5743:ab60:b14e]) by DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::e5cf:5743:ab60:b14e%5]) with mapi id 15.20.6631.046; Thu, 3 Aug 2023 08:09:58 +0000 Message-ID: <7e28ba70-d18d-13ad-78bc-6e97ea6796a3@suse.com> Date: Thu, 3 Aug 2023 10:09:56 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.1 Subject: [PATCH 01/10] x86: "prefix_extra" tidying Content-Language: en-US To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org> Cc: Uros Bizjak <ubizjak@gmail.com>, Hongtao Liu <hongtao.liu@intel.com>, Jan Hubicka <hubicka@ucw.cz>, Kirill Yukhin <kirill.yukhin@gmail.com> References: <9bef986f-7441-c4a9-5bfd-7bbed0a3d950@suse.com> In-Reply-To: <9bef986f-7441-c4a9-5bfd-7bbed0a3d950@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0202.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ad::17) To DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8790:EE_|AS4PR04MB9265:EE_ X-MS-Office365-Filtering-Correlation-Id: 50a03e97-ffa2-4320-a308-08db93f90786 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tFDnkl9qxN5l5Qp6f7hAPrrDRC8IxM4kC7jM0lQulE6gGhZkl0g0Y4UfwNG/WfI6OJwW6yJqHzNcqah0R/OiwLD0J8as56Mw9mFa2h/onuHM752PaLBKq8kBKN0ItDYaKsoAAuyr9oum6QxCkNPw76f9w8JHSx93bYP1H0p5XJH8ZOa3uH+EY6PUcRvMqO7HCZqTxq3vn5Jr97jbjI9RIJfGYTjz2isDZ5Y6YcEQACZXkgCqWYdOuF7OhKLHuqfE2nGUxSLT2IaAaknXd6SchUKWZ3AMo/aeU2pleVgTcwvvf3ZQwMawagOpyytd6ohvVXFVJTZr9Qzl7PeyQ9YK/wi7XhXoFWwURdKhUUm8Ql2slQvT/IrhwD6HDCKuazracyxDxNJDVxoOKrb848t4GyxqlOJ1f0d3el6aqFeZp4hqbwgcjA0wCXDOHefGMIxlTerQFP3cqCI5T9SMWCQcxPSQVBKJLSAPeXgfA4J8fE3ee6h7Ymc1yCMKcZOLKpJIexN8aJ/BgTQNauzqjNP4+/MvDAM7vcGNct5sHDJaerLdvmBd9bvB6IOHssi20tUiC3XutVn3T3MDcx2NZ/rF/d3T3XejGBktjNLIrBXYkECjYK1vK9zLGM5So8GFWGJVQsiBKMqy+njOEaZjxWkYEA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU2PR04MB8790.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(136003)(396003)(346002)(39860400002)(366004)(376002)(451199021)(2616005)(6506007)(26005)(186003)(316002)(2906002)(66946007)(4326008)(66476007)(66556008)(5660300002)(6916009)(41300700001)(8676002)(8936002)(6486002)(6512007)(54906003)(478600001)(38100700002)(31696002)(86362001)(36756003)(31686004)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?sMW5paqCxcCBeOZ2EW5AxO3T+KlN?= =?utf-8?q?KQZrh3g53NEZC57hIEIXU9o7X2iXrlAt6EAGc7gjw+S/ByWAZUBty6WMxUs4oYF/u?= =?utf-8?q?xdVgHnYJp6fNskiVychJQv0ne2lYHwHrgmCeo72jlus2bEBKpaE+4l7cz7QHg6dUU?= =?utf-8?q?MYC2q190MWwlHzgTdKxkui6sdKGc/w//WtmXbCv0hf5Z7x6jiNSkS0StgpOC3C8dQ?= =?utf-8?q?pe25gikHaM9Fx4YZpdBwx0A38NmUhQqR/vcyHWATuPGiS/AlC+rdXliALs7Q6+A3/?= =?utf-8?q?v0MUQMSQfvcX5GnkTxL4WCusXQG4PCOYBJ/xXVgqDJ8ChCVA2xpaYry8eeHxNwJAf?= =?utf-8?q?Ud9wJvOSv8hiUx731JFwNxUyBTENthHDjAAM/T4UMKoOwJdvA+lIUKtKlNCRFsxZt?= =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sYQyb?= =?utf-8?q?clCJdkH/gLI0S3OvLr+x3gzjQbBmY8H1i0sgWBmOzug/jKihQdk5KF3mISTKq4IOq?= =?utf-8?q?7mmOZC77vUb/uQtb7p1skzFJUyV+0XyJv5Vs+fP7BVXrZoZYxFmIs2+NAW9ccpAoX?= =?utf-8?q?mkDeVWHS23eHsXUPXLQh1XBwoZZEe5drLSGibL+++56nJyE94VfareYhu4dKEDyC4?= =?utf-8?q?cxkG8sVwgfDjP09hW4vdttnVJjUbU+LrE3SKo0KnmuaqFH5P24mOY0Q0UL+mOjlJ+?= =?utf-8?q?vLEd+hfhN6yx?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50a03e97-ffa2-4320-a308-08db93f90786 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8790.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Aug 2023 08:09:58.7037 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WCWrlLkIgs2RN8srlxgrVdfKr88ztSKlNfNBFimBe9V9oB1wfaDCK8YuhlQ6TxfeLUGQCogCpoPw1z4dFvZ5+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9265 X-Spam-Status: No, score=-3027.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Jan Beulich via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Jan Beulich <jbeulich@suse.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773194705550846284 X-GMAIL-MSGID: 1773194705550846284 |
Series |
x86: (mainly) "prefix_extra" adjustments
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Jan Beulich
Aug. 3, 2023, 8:09 a.m. UTC
Drop SSE5 leftovers from both its comment and its default calculation. A value of 2 simply cannot occur anymore. Instead extend the comment to mention the use of the attribute in "length_vex", clarifying why "prefix_extra" can actually be meaningful on VEX-encoded insns despite those not having any real prefixes except possibly segment overrides. gcc/ * config/i386/i386.md (prefix_extra): Correct comment. Fold cases yielding 2 into ones yielding 1. --- I question the 3DNow! aspect here: There's no extra prefix there. It's an immediate instead which "sub-divides" major opcode 0f0f.
Comments
On Thu, Aug 3, 2023 at 4:10 PM Jan Beulich via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > Drop SSE5 leftovers from both its comment and its default calculation. > A value of 2 simply cannot occur anymore. Instead extend the comment to > mention the use of the attribute in "length_vex", clarifying why > "prefix_extra" can actually be meaningful on VEX-encoded insns despite > those not having any real prefixes except possibly segment overrides. > Ok. > gcc/ > > * config/i386/i386.md (prefix_extra): Correct comment. Fold > cases yielding 2 into ones yielding 1. > --- > I question the 3DNow! aspect here: There's no extra prefix there. It's > an immediate instead which "sub-divides" major opcode 0f0f. > > --- a/gcc/config/i386/i386.md > +++ b/gcc/config/i386/i386.md > @@ -620,13 +620,11 @@ > (const_int 0))) > > ;; There are also additional prefixes in 3DNOW, SSSE3. > -;; ssemuladd,sse4arg default to 0f24/0f25 and DREX byte, > -;; sseiadd1,ssecvt1 to 0f7a with no DREX byte. > ;; 3DNOW has 0f0f prefix, SSSE3 and SSE4_{1,2} 0f38/0f3a. > +;; While generally inapplicable to VEX/XOP/EVEX encodings, "length_vex" uses > +;; the attribute evaluating to zero to know that VEX2 encoding may be usable. > (define_attr "prefix_extra" "" > - (cond [(eq_attr "type" "ssemuladd,sse4arg") > - (const_int 2) > - (eq_attr "type" "sseiadd1,ssecvt1") > + (cond [(eq_attr "type" "ssemuladd,sse4arg,sseiadd1,ssecvt1") > (const_int 1) > ] > (const_int 0))) >
--- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -620,13 +620,11 @@ (const_int 0))) ;; There are also additional prefixes in 3DNOW, SSSE3. -;; ssemuladd,sse4arg default to 0f24/0f25 and DREX byte, -;; sseiadd1,ssecvt1 to 0f7a with no DREX byte. ;; 3DNOW has 0f0f prefix, SSSE3 and SSE4_{1,2} 0f38/0f3a. +;; While generally inapplicable to VEX/XOP/EVEX encodings, "length_vex" uses +;; the attribute evaluating to zero to know that VEX2 encoding may be usable. (define_attr "prefix_extra" "" - (cond [(eq_attr "type" "ssemuladd,sse4arg") - (const_int 2) - (eq_attr "type" "sseiadd1,ssecvt1") + (cond [(eq_attr "type" "ssemuladd,sse4arg,sseiadd1,ssecvt1") (const_int 1) ] (const_int 0)))