Message ID | 9d0f914a-5668-a09b-5993-16a2270cf059@suse.com |
---|---|
State | Accepted |
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp377253vqo; Fri, 5 May 2023 05:52:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6/QuFtAbE8eYbSOtZt5fRWmmbMTY0g6FeIshTpsyR75TWMVuTWXAij+bvPumN14Zi3iLI0 X-Received: by 2002:a05:6402:150e:b0:50b:e17a:2ee with SMTP id f14-20020a056402150e00b0050be17a02eemr1424152edw.31.1683291145247; Fri, 05 May 2023 05:52:25 -0700 (PDT) Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id b15-20020a05640202cf00b0050bc9c38fcfsi4632907edx.322.2023.05.05.05.52.25 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 05:52:25 -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=AQne3e6X; 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 7AD323858C52 for <ouuuleilei@gmail.com>; Fri, 5 May 2023 12:52:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7AD323858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1683291134; bh=191k5YFkJEz3SRma2DDM/rfJunjFN1nFUMfyjRecFso=; 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=AQne3e6XJgQLpUlLR87ZvaFKc+MlOF5dq7WiJpvWned3a/wgxAikPDwWtFrfAgxoL 1WXaJAs+cD2tGyKk+IVNzCKtZ6ZJx7f8mOSDXM7Ko/v+iAa4wUqfeEwTBNvlIffTMg vhvWKBmipyTI5wXkLgLJH7OqVxjD7xA3EIo3CHJo= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2087.outbound.protection.outlook.com [40.107.247.87]) by sourceware.org (Postfix) with ESMTPS id 15E333857005 for <binutils@sourceware.org>; Fri, 5 May 2023 12:52:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 15E333857005 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jfI3ywn83mffR9SSbx9V4dppBH1ik7q+ntH8XwH5kELjsfpcx0pQ+nbGxkTdWi9f0irFBcJIwbdxH+ip7QGl4exU9/RvTCKMOTYOOCI9BlK+/ctQso7kjKmiT5u7K+hUcQ5G1xqX5ZUKCjRZlB32YmbHLOvgUpnqKizGf+AlsaeJp7+uk4Afps8iUiMFw393geET2Hjmi04ITuecNJRrn71cJZ+BxiOBoY2HcyMvGNK3tvZ8bVxuwqleGIFrAnJ2kMYQL9rL2Xi0V5t/8HIud4x0ub7P+fLRvUnVlMxYDW844YGvRXmsBrKXAG5ApOohCFovVYEETgYvyGIh0rK6XQ== 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=191k5YFkJEz3SRma2DDM/rfJunjFN1nFUMfyjRecFso=; b=d8Y9Pw+m404Yl+xTuegiZwW1azzbS2bjC9Au9uxxJ7MbfyZ9SEIwnXY8sEAxesGJP6Ye2cdSsOXlReKx9A3YfrvvnG44cdUTiWT+6VItSU1fZGV9zfPM9u8oVRTx/jdEIAtJWx0Qy2ipVcxGUoIAoizd1L+Z15Du637jgo1Hm7cpsFPiTS5pTpCZ7vx3p+ZF1aXWCLF0/LG3QqIALvP8phrzIl7Or8nxS1fs6KB6F6SzTQngU73iJrj6SfObn9Av2ShxLwhnys/i3E21+L3lhkU3Q3rnbiJnXLe+/SoxnSiIDrW7Y+PsY0UjYqyzxsHhfQ34wJw9FwZHdFxvnNi08Q== 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 AM6PR04MB6551.eurprd04.prod.outlook.com (2603:10a6:20b:fa::20) by DU0PR04MB9395.eurprd04.prod.outlook.com (2603:10a6:10:35a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.27; Fri, 5 May 2023 12:52:04 +0000 Received: from AM6PR04MB6551.eurprd04.prod.outlook.com ([fe80::768c:6df7:9afb:acd7]) by AM6PR04MB6551.eurprd04.prod.outlook.com ([fe80::768c:6df7:9afb:acd7%7]) with mapi id 15.20.6363.027; Fri, 5 May 2023 12:52:04 +0000 Message-ID: <9d0f914a-5668-a09b-5993-16a2270cf059@suse.com> Date: Fri, 5 May 2023 14:52:02 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: [PATCH 2/2] x86/Intel: address quoted-symbol related FIXMEs Content-Language: en-US To: Binutils <binutils@sourceware.org> Cc: "H.J. Lu" <hjl.tools@gmail.com> References: <e84fc499-62d1-78c7-8f61-6e0fad9b38bf@suse.com> In-Reply-To: <e84fc499-62d1-78c7-8f61-6e0fad9b38bf@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR2P281CA0069.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:9a::10) To AM6PR04MB6551.eurprd04.prod.outlook.com (2603:10a6:20b:fa::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB6551:EE_|DU0PR04MB9395:EE_ X-MS-Office365-Filtering-Correlation-Id: 1966f28a-9e88-493b-4db9-08db4d6786b3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mj1egbDnqOxmtw14qaH3lbRaIpfoLvSgFcZUWPc37NCvtyFAAA7oW576GO2nSwWhlPU61gcqlWp8Frlnq7gyMWe50b0zO1Z8Gg9zesjCZaHfdMrvvs/1fpxYl2q0DdklHwmr1OjRW5IXTfIbpkPWLZ+P2zalCgFHobT6SeHpqwv+sR+5/DPiw0mMsurOsT610HNIu6HBjE6Bh+GWpiiToJB3EukBSMNZfIMg6AJWcSPLFpI41KpNEFh00dnwoKavZ8zp/UOb3R3Yc5iUfZO970/TbYMSUwHWA6GNTJUU0UptexbasOmQKSY720opmrj417+gAjo+Qh5R09F6rbILG3qNGcqDkSamwH8UM0CCjr3VdvO+CXt4sU1yyQN8Rh880b7RFjbNPFrIHBHjaAz6NwuL5GPiv6m+Li0IWESo9Ouf1HU7HNjhq3Hivl5KabqZi2aGbezzbv3Q9H7P0NUXUz6M4vY38z5uEmjIyGRo/LmZlepez/dez1BNAnj50bUTgHq5bIbN/RZj46ThOoSCpjktsxrCaIvshdLH5QkNm/bdkWwt4bZUHwoIRnrhyjkD8FhQANNZP5y7hzC/kvM1T2Zg6aDskGS9+MM0stkFvortWevTP8j4A/epoXgA7IFMGI43c0xC1UUxdnPWsvaCjg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB6551.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(39860400002)(396003)(346002)(376002)(366004)(136003)(451199021)(2616005)(186003)(2906002)(38100700002)(36756003)(31696002)(86362001)(8936002)(8676002)(5660300002)(4326008)(6916009)(66556008)(66476007)(66946007)(41300700001)(6486002)(31686004)(316002)(478600001)(26005)(6506007)(6512007)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?aVV5muAM7QjWzgwU/AkZfi+9a06r?= =?utf-8?q?k4CiGrzLi/c5Fmz+yXOjLJTzqeWqSyC8sqkBrO8udxOm79wlgeWf+lJEU0P0NU6I9?= =?utf-8?q?tzNxXugk5+ANsyZ+5weSsTT0gh7n3DqYP/KUhkMuycFmHhw2QAUjD3roqHKJR0H2n?= =?utf-8?q?K8yMcR2oKIvNAP5+TbFx/wj4s9BgxKf0ehu8o+XKyRTMBv0JvDPqtk1LFOeh+m8iQ?= =?utf-8?q?9POhJw/C91ycrNMgzJvOGhK4lOpX3poeNqF0NFbOcoPOIbuq13fvP1TPiGmxPmZ/P?= =?utf-8?q?eG61M0hKrY3WVm9bg4JpWrqlTDR3TwemnRYAuDliNo8BVbLtHLdza8yGr47aDnS+M?= =?utf-8?q?eNAHqKLACerfNmwkv2TnR3PQigKzFplVr0WfeGvzLPs6Gn0DkUnTzrx33s60kf0OA?= =?utf-8?q?6AaS11sts4SKhq+0zgGaXXXp4zfL/daENx+iPLgrwE1LAaJfloBUutpSpTLky6cvs?= =?utf-8?q?8WlBEFIerrg8v0DoOTN3ROZK7OWKpe9Se6KlwLCGOy7SOAPE64WacsGttinBbj9UZ?= =?utf-8?q?891JS28qNe1SPmq+bgiLFD6lEik/wxip4RgcfwTG21pt/q6lYxK9IWJ26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utf-8?q?rpvR6oIbSLY/PL2tuYmB7fxP+ngm+jXcThOA/C528vilRr68dbkr09ZUabAWlIF9I?= =?utf-8?q?o+QjmtJDshCA?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1966f28a-9e88-493b-4db9-08db4d6786b3 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6551.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2023 12:52:04.1086 (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: ntEnEA/Y5iBljwUpgE4vR5OjQcevwdO+x7WwaXJ4bABSNyMs2q31tFADARCDA9ToJClYuy2wppbLDZCLaIzO6g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR04MB9395 X-Spam-Status: No, score=-3028.0 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: 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765058696398387196?= X-GMAIL-MSGID: =?utf-8?q?1765058696398387196?= |
Series |
x86: don't recognize quoted symbol names as registers or operators
|
|
Checks
Context | Check | Description |
---|---|---|
snail/binutils-gdb-check | success | Github commit url |
Commit Message
Jan Beulich
May 5, 2023, 12:52 p.m. UTC
If in a "word ptr <address>" or alike construct the "ptr" part is double-quoted, it shouldn't be recognized as the specific keyword we're looking for (just like we don't recognize double-quoted operator or register names anymore). Be careful though to tell closing from opening double-quotes, as a quoted symbol may follow right afterwards.
--- a/gas/config/tc-i386-intel.c +++ b/gas/config/tc-i386-intel.c @@ -188,15 +188,12 @@ operatorT i386_operator (const char *nam if (i386_types[j].name && *pc == ' ') { + const char *start = ++input_line_pointer; char *pname; - char c; + char c = get_symbol_name (&pname); - ++input_line_pointer; - c = get_symbol_name (&pname); - - if (strcasecmp (pname, "ptr") == 0) + if (strcasecmp (pname, "ptr") == 0 && (c != '"' || pname == start)) { - /* FIXME: What if c == '"' ? */ pname[-1] = *pc; *pc = c; if (intel_syntax > 0 || operands != 1) @@ -204,9 +201,8 @@ operatorT i386_operator (const char *nam return i386_types[j].op; } - if (strcasecmp (pname, "bcst") == 0) + if (strcasecmp (pname, "bcst") == 0 && (c != '"' || pname == start)) { - /* FIXME: Again, what if c == '"' ? */ pname[-1] = *pc; *pc = c; if (intel_syntax > 0 || operands != 1