Message ID | 57d5110e-3327-ee71-4794-16807a0f3ea9@suse.com |
---|---|
State | Accepted |
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1085966vqi; Fri, 11 Aug 2023 06:16:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFsQT+DvbUNnQre371fE+2ByckdGfDSsf3Bnj9NVKFFIO2+5G1uxQqUd0PfavarXecnot0x X-Received: by 2002:a17:906:1001:b0:99c:c8ec:bd52 with SMTP id 1-20020a170906100100b0099cc8ecbd52mr1597537ejm.69.1691759796735; Fri, 11 Aug 2023 06:16:36 -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 e18-20020a170906375200b0099bc8469e26si3466925ejc.923.2023.08.11.06.16.36 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Aug 2023 06:16:36 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.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=@sourceware.org header.s=default header.b=KQJIBh3k; arc=fail (signature failed); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 679033858415 for <ouuuleilei@gmail.com>; Fri, 11 Aug 2023 13:16:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 679033858415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1691759795; bh=/tACS5rD6FarvAwsePBTWXHiLkrr1wpdYOZOFXYyLcs=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=KQJIBh3kL3Yhwxe1aRRuS/0/2gmnbvSSVcDpKVOfsldoq4ZNkDucoMzqOb9jHNoD4 CjufDEFZkTXjNmOftjRiIS9Z0NYABEKFEEtJktOI+VfsrI761GIlbOcwXIv5Q5X8fl DLybgyUlkPUuhiIkgK4E7xY6AKWDWfRXY76tkg3o= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2080.outbound.protection.outlook.com [40.107.21.80]) by sourceware.org (Postfix) with ESMTPS id 6C8543858D20 for <binutils@sourceware.org>; Fri, 11 Aug 2023 13:16:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6C8543858D20 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TGje7KFPSSfbdx/liz8+FiJGcpiHF0vAOayy0d6BPjjPS87jtb2aVEKI/PQ7hRDqwydSykTUzKy9euJgaZalz280lzBL5yNt1TKgnZ14xc2viSwEwpzi5ZFPbp1qBdJXhbhjyrC3Vud5z8BWMPzO9SulFwC/XHdzyJl/T8cInk7FGjzu+W8unxSN/b0Zg/n8YvhbINcBUkuwEQFEXYb2UvoOQRlcB4XIO6W8kgyCtH+NFwCjvqN1yuCKW3AD/8gDbUcjoqSHT7sTy2k/IjgTkSQIfbsG5YLKJ1j8iiSjW090CGCbHJOcQDHUuFvMAlQhjB72eUHs1PNY0NBmnvlKPg== 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=/tACS5rD6FarvAwsePBTWXHiLkrr1wpdYOZOFXYyLcs=; b=npC7jSEGLqtDwQIxTGQt0Ya26vowK3evLlo4YLY+vVfkA5c5WIL3ru+PGe5naMjy8MYe5bdszVXlXMW3Ca1MCJhbRHDIggY+e7Q8fn+aE9gIE3DKVyHK/fc0n2s4qYCZo44pcyMU1n4gPejIsa0ZbghwaCYRwNJ9xpNv0I+jYKPtlyWjIXuumo5pCnMNzyCXFscGZjCzW/S+ZrnTI3wLVo7rSgYb79Iww3AXlppkIVXM/yxonxY1Et716G9crxFCz0YMObL9lLwV5hPET2xxztjxexK7Fo37Yr8bas2bsH7FuFGW8cXQPjBuTBoxzcNgQq/ZQcVdFF0BlK2cbTOWIw== 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 VE1PR04MB7247.eurprd04.prod.outlook.com (2603:10a6:800:1a2::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.30; Fri, 11 Aug 2023 13:16:23 +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.6652.025; Fri, 11 Aug 2023 13:16:22 +0000 Message-ID: <57d5110e-3327-ee71-4794-16807a0f3ea9@suse.com> Date: Fri, 11 Aug 2023 15:16:21 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Content-Language: en-US To: Binutils <binutils@sourceware.org> Cc: Alan Modra <amodra@gmail.com>, Peter Bergner <bergner@vnet.ibm.com>, Geoff Keating <geoffk@geoffk.org> Subject: [PATCH] PPC: remove indirection from struct pd_reg Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0175.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b4::9) To DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8790:EE_|VE1PR04MB7247:EE_ X-MS-Office365-Filtering-Correlation-Id: 2ab2ed7b-6bf4-4e72-360e-08db9a6d287d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xADt9ZeuNJNbA1zBmwAOwQyKW/K8N7GmJjHv9W2nmJGDHA2mWCUNBbblfXSJkFQiCNiSDZ+h1o6oaglCkzoAZ1qe+GGbwAE1CI2bC5nJJE0Wmpe5a8EkWlV2OWDsYEh1lD6cb/n3Tmoru6uwI9mZKL3Lb+NuNxjkkhpauAipjKABftcKLICxrEdiMVIcksQW96PXG+U3T2YeAHv2DAw5TlSJweYApl8BC2v7NobCdVScFV9tTxQIF4pMwEcddLdFCUTNIw95cMajBK+pFwfJtvKzhdTFCNE5t5O1lv/eplEUtJ3gMW5bNS/NVFAukY64XgJ+mk3ry8hs5LVGo5nnNFVrKpNHf5VO64OLkxAqyyc/42FiETRYZ6SIO0gJKdzgQKzU+VbKd7xoDATaFn60skhEiS8CkHwK2nycyrYK7SfKDTzfTL/cWf/MVsFBx68a/INfwLis6ubCdJHxK9d8nGU1y7XwjrN2ndunEhtDQczDPf9uhpU++8kwSqa1mcqgaGOCJlBzzdJGabFHGys7kqpuh7mC6r16zhUy5ma+kNscnb85UNb5+1DBWyx0qmVqo8SAlV9PVyieiF3o+d/8zpO8V2RR4YCsyMGt73hVFXhiCx1o4a/2I1GhgxM4ew+ogcwnkGS0YnbqjUobJPfUIg== 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)(346002)(366004)(39860400002)(396003)(136003)(376002)(186006)(1800799006)(451199021)(31686004)(6916009)(66946007)(6506007)(26005)(66476007)(478600001)(54906003)(36756003)(66556008)(2616005)(41300700001)(316002)(4326008)(6512007)(6486002)(4744005)(2906002)(31696002)(86362001)(5660300002)(8676002)(8936002)(38100700002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?dQmGT9C/Ou+jo848u8CsewC8oRCU?= =?utf-8?q?9eNXRidCAZnKWUImv54R9EbCA0YjpO9sltGcADeJ85iHSuuesIAUlXlOEJhfLwFXK?= =?utf-8?q?kOJ8DIgBhhiBnHqB0D60BFQMezslvs9aRXgpzRpdmeJref1IrFR8a1NJjNrXnH+TF?= =?utf-8?q?HfkM6UkrnmuvhwpMmIMmydSEGLqXYyZk5yYNbvyzRzZ1KkKFTvsX8w8XovwElBERI?= =?utf-8?q?qIJEaTsMDL9h57t88o9JPy+nUPTCGf2LPhSu9JOootx8Nzd4AV8ddqvkMX18hFb8t?= =?utf-8?q?uNPC/oZHDhse60iGjOAYJ5c2R1zkpIA3UF1+eWOc4+dbPaND4fj55MyJSzppA6+b1?= =?utf-8?q?TS6JI/YQuueztiXsJLLsDhSXbUfYIEtU8UozuWd8BHF+JcqqqBIvfatBdTCSEIDqG?= =?utf-8?q?8CpARDHDye7cKXPvf89hF2wtk1BMdmczPSSCpSv/yIftoaBHgcEuEA/r0WAk8lLdV?= =?utf-8?q?0HmMG9KEfckEITUNhL9Lz89Mxp2FuL1VSd7jSX7dUFmAuloyaIYklbuIpaVbtKQUu?= =?utf-8?q?R4y1KhwYIZR1ES37UuAgxwsedbnako9x4QJAbCwi/fdfo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NCM8tOln8FvzmxAL?= =?utf-8?q?kZe5OfFFpMFuDa7LiYjlLXel6SsCRuzHDANfOY6uVHg2sw8mQLHFFp55Wc0v9Ei48?= =?utf-8?q?O8hTFZZxIJ0T?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ab2ed7b-6bf4-4e72-360e-08db9a6d287d X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8790.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2023 13:16:22.6658 (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: g7JLbZ30126oJRs80ttHBJaqRJLwBvGYWB2+qcb96J5mDHfU9KKtYfu4JuRl4HUmlTzYSf4OeCZe9Tj53jPQDg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7247 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 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> From: Jan Beulich via Binutils <binutils@sourceware.org> Reply-To: Jan Beulich <jbeulich@suse.com> Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773938720584286587 X-GMAIL-MSGID: 1773938720584286587 |
Series |
PPC: remove indirection from struct pd_reg
|
|
Checks
Context | Check | Description |
---|---|---|
snail/binutils-gdb-check | success | Github commit url |
Commit Message
Jan Beulich
Aug. 11, 2023, 1:16 p.m. UTC
The longest register name is 5 characters (plus a nul one), so using a 4- or 8-byte pointer to get at it is neither space nor time efficient. Embed the names right into the array. For PIE this also reduces the number of base relocations in the final image. --- Of course this way the structure isn't a power of 2 in size anymore. While adding padding would still keep overall size below the original for 64-bit code, in 32-bit code the space savings would likely be lost.
Comments
On Fri, Aug 11, 2023 at 03:16:21PM +0200, Jan Beulich wrote: > --- a/gas/config/tc-ppc.c > +++ b/gas/config/tc-ppc.c > @@ -279,7 +279,7 @@ const pseudo_typeS md_pseudo_table[] = > /* Structure to hold information about predefined registers. */ > struct pd_reg > { > - const char *name; > + char name[6]; > unsigned short value; > unsigned short flags; > }; Thanks!
--- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -279,7 +279,7 @@ const pseudo_typeS md_pseudo_table[] = /* Structure to hold information about predefined registers. */ struct pd_reg { - const char *name; + char name[6]; unsigned short value; unsigned short flags; };