Message ID | e05223c9-40d4-ae46-5b5a-3d0f7e1e6d79@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 z4csp2690100vqi; Mon, 14 Aug 2023 04:57:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFUnviGooT8gutuCXTuxgb+282dLuAIasaJIeDJwfBnQnEzsTirSjcujH6fb9X1nHh371YC X-Received: by 2002:a17:906:154:b0:991:f427:2fdf with SMTP id 20-20020a170906015400b00991f4272fdfmr8274506ejh.76.1692014227343; Mon, 14 Aug 2023 04:57:07 -0700 (PDT) Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id x14-20020a170906710e00b0098dfec24292si7794903ejj.829.2023.08.14.04.57.07 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Aug 2023 04:57:07 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=H88PD81B; arc=fail (signature failed); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 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 39F913858C33 for <ouuuleilei@gmail.com>; Mon, 14 Aug 2023 11:57:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39F913858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692014226; bh=jeK6bfWdxx+xmc4HmvG/FZHe2Yc5+gPb+IP7dq1kBH8=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=H88PD81BM+AfUpprEG4MFgJLLncwfLmVOHRFT/ZcWaQOzuBYzyuedjZ3jPVFBJ+m8 ABOzW+2lPaXAeh07tLbR5PrMFDBfb7Pk8+v2WPFGnBDwGMHJx8pZW8ZqJDcncezi+O HuuxfreY1yLBa31so9aBXACkzgXFw/SvzidJp89U= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2045.outbound.protection.outlook.com [40.107.104.45]) by sourceware.org (Postfix) with ESMTPS id 530463858C1F for <binutils@sourceware.org>; Mon, 14 Aug 2023 11:56:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 530463858C1F ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KXaEtjDq8ms81cWJtdMi8tUZkbLJSaH+72edwBpWdGSZFyUEtCoaCjNzE+ien9N98gjYp3qZgCjkJlhn5GvN2NhLpxSJSszVEWsQudxNx9dDrEJAWZ6ZqgClLPTmXivWu/2TbACn5hqMv2wJepPx1aUhYJ5+E9dWT0gMfZ5jngMduGwfSzcjm4OmO0jrCZ6Fp4Pg6nUKRLa/nEvQH2VXD58th+1F0mbx0bywHKeYrQScgCsVcW7YLh4BX0uf2F5oZFRBV3RB4VBBYjyNxYwzJ0VJjjySCU9MTiTQ3M+gNljv63e7SwWxR06XbvM6JNPkBvBQnR2K93ILLZepBXbbEg== 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=jeK6bfWdxx+xmc4HmvG/FZHe2Yc5+gPb+IP7dq1kBH8=; b=KtDQGUKBbWm+67/82AOJVs45JsQy+scA385EaFtxa9DixxtUYqenDIXMNQzAl5i5GxUg0GaRrRaEMdWwdSNw4lEydivWBVNP+vSEZ0VY6NF91yXSXIDfwoB6+6xpANFQ4qdOzgeoMAYpyEAD/wrKCnOWVP+YmeeF9lU+8KAloBfoko7o1BOHi09t6DlwyX6RIb8TTxHRorWm/KJkuPjhWqXzoGFJ07IGStej0dE0sD21Iug/wkqJmN2BEaMb9DvwwMMnzkpQ7DgqjKfPLaHdxn2WtsMcuykcOZFajZ2HD88v17lu1mk1gWB4FFtQoVbCmvVjltxyvwcYUsI7lx8hYQ== 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 PAXPR04MB8623.eurprd04.prod.outlook.com (2603:10a6:102:21a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Mon, 14 Aug 2023 11:56:51 +0000 Received: from DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::79a:54ba:8003:fbe7]) by DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::79a:54ba:8003:fbe7%6]) with mapi id 15.20.6678.022; Mon, 14 Aug 2023 11:56:51 +0000 Message-ID: <e05223c9-40d4-ae46-5b5a-3d0f7e1e6d79@suse.com> Date: Mon, 14 Aug 2023 13:56:53 +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: "H.J. Lu" <hjl.tools@gmail.com> Subject: [PATCH] x86: remove indirection from bx[] and di_si[] Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0083.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1f::21) To DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8790:EE_|PAXPR04MB8623:EE_ X-MS-Office365-Filtering-Correlation-Id: 3f1754c6-5733-4fdc-ae98-08db9cbd8c04 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kk7BgqN9M53ywzGtplNqt+4ZZ88rdEPCKd2BZoS+4i1MqyLXyM2BNhi/J7rZQt9wnUmdbTskxp8lm5lUzaCoqVKAZFtyNYaAIWgykYSB7tgr21nUCrnQBH7EMkZBNydv2t1bd8UU7ZTKmlTW19GgtJb1HOWcYBVDv44cvTd3I2YyLFyWPuDR0im4oKfRdGaUiWmkyWWFXjmORO0ml6402CrWWZ260IRUUrCNvF9Z4KpUqRP6Y28ak+nJ4fYqQVgkGIAvBqEXeFdcs/XMOgUvwbxIm9x/OFg08pXGDwV4Nj4tzJiaZpNE6zq881ePI7RqQypT3cibbstjj/3067YpeBniIlJ1zNDVDJrvrZWMO4p0Y+L07kb9W782jqyziefYZdyihR228VT3CGZvWCQD45Vf4JW0MD5YTJdYvUpo3T3xMDjrZ4CKzzEpmBFzQ1guE3qMllmfdmgI3I+uBO61j7HKcrjblvZTWMgXh813/ddR/Vw1BXs+5AbtbiZFvkGpQK1+EjpSceWUSR9gqmwtKFkq9NfQdQkOgE2JxwNOrZNzCIwUguKIED+Hk8cLDv44k40Yb6MzOBi9jha9/uko1Se/MOP0mk1x02Qp4jy0k7qrEOibCHWMeW3MYIslq6aN/MjEIsbUqov+MutYDcvRuw== 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)(366004)(396003)(136003)(39860400002)(346002)(376002)(186006)(1800799006)(451199021)(31686004)(6512007)(6486002)(6506007)(36756003)(86362001)(38100700002)(31696002)(2616005)(26005)(4744005)(2906002)(478600001)(66946007)(66476007)(5660300002)(8676002)(8936002)(4326008)(6916009)(66556008)(41300700001)(316002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?YfblVBI35Ow67PGH6WPV+O3TpEA+?= =?utf-8?q?H09MO/8paA4tnfojR0K6NOOPWycwUk5w1/Ic/uQgCqTIOpRMghbqAQcwT5hDCkpPI?= =?utf-8?q?4vzeTuf/wVunNyN59x12IgdUirxYkiNKWLhjgaAT9oBfxRB66xQXYVpwqgpi61y4e?= =?utf-8?q?tokrrnW+6jbEX08IcLHJzvap2faiat++8nudqwy011YF6gLrmM+FILUgmGt3fvThx?= =?utf-8?q?FTYBFSzO10S9BkoP1hwnlITFz8CdHQqdTuSM9mTp2uFs6LBq5uj0wMOQ5Lo6SMNiI?= =?utf-8?q?hMdQL0/6s7ZiNsrZpeRPoKYwGJnXvaQMEmgO+NDFTOHr+JQ9v+iGmlCHUVLtxNnpQ?= =?utf-8?q?+yxwmU/aNDrrUlWVJfVCl7iK8RVdRqP80fqAb7dTWYtptZOUbzEJBaqpzz0aKY0sk?= =?utf-8?q?RmzvWjvx1akYf6Sp8JQGS0DvLMNeyXMNNulJe7d8J/JKrL2tZz6Spqkp+P/RiOiJ1?= =?utf-8?q?2RwXt5Ax/AfnJxgc89Me/dJuAn13bLZaMFhmdKuv49f/wMNDxUIa2t0R3K49ctmD7?= =?utf-8?q?8XNGkSvmPjiuShL2ULF42wuOiz9Pl/MmAfv+Dz5Hs1J33NLhfnkLAEgNdG05ppwkN?= =?utf-8?q?hXuH0yxQEAkbbJqvbChwSFgwVEfdj/VjJ/GMLqNMo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ThJ71?= =?utf-8?q?UKx/PbSn+ezk?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3f1754c6-5733-4fdc-ae98-08db9cbd8c04 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8790.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2023 11:56:51.5900 (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: TtmVEe9EyyFFkraCZHkPG4DHfn6gqn/1gmsKAryWBDSh/IxH3WgGtkvOW/V7qtkAGgjGvA8U62A6RQtf3hLzrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8623 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_NONE, 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: 1774205510341088915 X-GMAIL-MSGID: 1774205510341088915 |
Series |
x86: remove indirection from bx[] and di_si[]
|
|
Checks
Context | Check | Description |
---|---|---|
snail/binutils-gdb-check | success | Github commit url |
Commit Message
Jan Beulich
Aug. 14, 2023, 11:56 a.m. UTC
The longest register name is 3 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 slightly reduces the number of base relocations in the final image. --- di_si[], looking at its contents, also is somewhat misnamed, I would say.
--- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -12250,13 +12250,13 @@ i386_index_check (const char *operand_st /* Memory operands of string insns are special in that they only allow a single register (rDI, rSI, or rBX) as their memory address. */ const reg_entry *expected_reg; - static const char *di_si[][2] = + static const char di_si[][2][4] = { { "esi", "edi" }, { "si", "di" }, { "rsi", "rdi" } }; - static const char *bx[] = { "ebx", "bx", "rbx" }; + static const char bx[][4] = { "ebx", "bx", "rbx" }; kind = "string address";