Message ID | ebffbf50-fa83-8e7e-eedd-d9e9d1b4aa04@suse.com |
---|---|
State | Accepted |
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp770144wrd; Fri, 10 Mar 2023 01:27:18 -0800 (PST) X-Google-Smtp-Source: AK7set9RGl3APY+Q4oaqe4yV5tYPdAg+CT7G7wnONm9MRAIZdqI3gpfuZLFQMigwaJb47m878xwq X-Received: by 2002:aa7:c0da:0:b0:4a0:e305:a0de with SMTP id j26-20020aa7c0da000000b004a0e305a0demr24013831edp.19.1678440438684; Fri, 10 Mar 2023 01:27:18 -0800 (PST) Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id a6-20020aa7d906000000b004add4da41f8si1885446edr.623.2023.03.10.01.27.18 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 01:27:18 -0800 (PST) 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=AJ9wujRW; 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 2A34D385B51D for <ouuuleilei@gmail.com>; Fri, 10 Mar 2023 09:27:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A34D385B51D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678440437; bh=3vQHCizkxgVeNtEjii3TXhqiylVqinOtvgrd6vWGJlM=; 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=AJ9wujRWSAk0z1hJKlKRfhFPUpvOnO5lvTGqClC2hHV1tErHQpfONDQuaznTQxFyE MxhJ1EaBW0hOpxjAuS41Ulad4iY/Ivk7RYIJ62Uwrx8D3KQT01anamZomx7dxonSRg HiL1rvOEQO75Bo8UGg23YJHzS0VU2k4ledMemZjY= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2055.outbound.protection.outlook.com [40.107.7.55]) by sourceware.org (Postfix) with ESMTPS id 508373858032 for <binutils@sourceware.org>; Fri, 10 Mar 2023 09:27:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 508373858032 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eYMZW2YJpXULL20Y+xcuQErr3mtY6RH3wTszRBEwxeHhBbRjweVdJMqwBuRj8LeivYSjpH5wjZmulSYsjPJwE2VuzhJMlOJ/bM2JvNA+XQgXUBChZLCZP8Jcs0JZHbHhjSaogmSSF3LObVwj3tGU+F4FBloAm5oAPF37Mx3DRDViazUXoJ8SMpK7qIIdd1HXWBNxk+kfJwndzy4WHAWJI+HP4cZUUPMZtqVHzK5ax3EZqiUPXULmZb9WKQ3OjDZDKPkjBorMGHJzUxod/ZBKLkLbWv0QD4Q8MXsQDfIoL7TjsNdTyufYAP30FsQCOKLM6AAsW0Z7cYtLADs8K8AGEg== 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=3vQHCizkxgVeNtEjii3TXhqiylVqinOtvgrd6vWGJlM=; b=WpPlRs3uTBLUZeZAZpSrdbvHcHUuU7WsH3WbCnqfmxbreUbsfm4hClkxy8sVbo3UnB5f2xSHbsdpk+TGakxqa/Qvf4Y+1H4UW0yK9P5e97n5r8I0vt7U6NIIGbopbY0EAkfST7FKBA9URUL4V/HW+x0+da61hitOUBPMrVKYzHQDaFMZdnPuQig54CuFMGPDC8OZ4bRFFBjOIYnSN1TWyIvyIM9gcmKYFCFO7mUQpsit+PrnaOFBo0oO9LM5wyS31Vx2vTPNCsDaXwKexqGwoWaE84blvESQkRQx16SkU02JEE+wwHultXcD41M2bfwBUMhgAG1ODJl+hP3wsD407g== 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 VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) by PA4PR04MB9464.eurprd04.prod.outlook.com (2603:10a6:102:2ac::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19; Fri, 10 Mar 2023 09:27:07 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::154e:166d:ec25:531b]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::154e:166d:ec25:531b%5]) with mapi id 15.20.6178.019; Fri, 10 Mar 2023 09:27:07 +0000 Message-ID: <ebffbf50-fa83-8e7e-eedd-d9e9d1b4aa04@suse.com> Date: Fri, 10 Mar 2023 10:27:05 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: [PATCH v2 4/7] RISC-V: don't recognize bogus relocations Content-Language: en-US To: Binutils <binutils@sourceware.org> Cc: Palmer Dabbelt <palmer@dabbelt.com>, Andrew Waterman <andrew@sifive.com>, Jim Wilson <jim.wilson.gcc@gmail.com>, Nelson Chu <nelson@rivosinc.com> References: <ba68222c-7de6-280d-e98e-503e3c27addc@suse.com> In-Reply-To: <ba68222c-7de6-280d-e98e-503e3c27addc@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR2P281CA0125.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:9d::19) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6560:EE_|PA4PR04MB9464:EE_ X-MS-Office365-Filtering-Correlation-Id: b1cca46b-bed8-44f9-9851-08db21499e04 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IP982QsVx8qASNaNQFkcgr5u6MR4RifexDDSVDyyfXyKTymsF09p0k9L28uV0X0knmLqr5yEJVncijjBVHRjQkrlVGVFzAzDL/5K7fmqiCAEkLvIp00XilO+TrjTRLNidtlR6kxlmalGCybDRdyFLQjxlNji7aSZu/IvSaYzyXY7TyxwURL+CBnnDf7RDf1NhP1iE9HgAcOQqjXtiYOnU34wQFIZtK71f1ZdDk7ec144qyQkFuff12FkK4vGSjPRG+eUpHTzfhbVQEG8NHsot7mvsmKWVyC8cJfi/1WrPfMHOOf/G+gKvvjcONu7Qx9WUCrlbmjB4KkTuMA0ZbOxD8Xcwc6Ei0n//o4ZDS5BiVwf9BI+6xfOe0fNIQTC9keHLAMFCbK0/Nu8Teu5likmn/CRh4n3dmoIF7ZmE8+MPkPXBkuRGy2wkjpjehDvk1NLcbyL+PreAhx/fhzj3RkdX4LbHZf3Y35ZlxLNybFeTYxyfrUzeA4jqwB2yxlHx9NLdqIXsjkLhsiAeu4ohgxvIJLzamdQR8E27FLlFTVRIZeivX8Z022/OqeFliN6Hg2ji+/clxDELFCdLiVPDZMgIrs7m7Waa4V31AfYLdEiU1iu9ubuqCxKKKx+xP7ahejXCAlsGz5L7HL/EScfsFVZ6TOJMdfE/+h/4S6+nHAZg/AotvCzCUo0XgY815vYtAI1n4+VDQQq64NM7RyyYEw58BmIMnPEvO5nPR0jRQ5/aAQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6560.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(346002)(366004)(39860400002)(396003)(136003)(376002)(451199018)(36756003)(54906003)(478600001)(6486002)(316002)(5660300002)(2906002)(8936002)(66946007)(66476007)(8676002)(66556008)(4326008)(4744005)(41300700001)(6916009)(31696002)(86362001)(38100700002)(186003)(2616005)(6506007)(26005)(6512007)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?cntBCcHRoqY6w71f46Biv5PTF0D9?= =?utf-8?q?8+KbbFi3NdfJyusI0ecQyd4DX66qypcX87QDk349B50eSIEwrk+3x4fdQuI7Q9Tn4?= =?utf-8?q?VVMUNS37f53Iy4voOCZrcb6MzKnLQjyGLpRt69QVOhIjE8z2aKMt7mAtjMLa9NFNv?= =?utf-8?q?/N94zMHbCChusQKobk++ieFGZcs53MFNPqDQxGiyNYWhWa8StDGxEdkaIotlfjB1L?= =?utf-8?q?y/FJeN8oZzDous/6awRKj6irMZfrgzLOw8wNAEOUJ23aHEGOGJEzYzcByVKAaVoQ1?= =?utf-8?q?wRSR/S2cAp+7uU9jmaodrXIZgijaSuIDh0Ehys/4rTDgvEiunybGDqz2KRP10OhUW?= =?utf-8?q?RewvLtwGCYoIHm3AEJJRDLLYgd/wEXDlZ1dDfqkjFANWBbWX6czBOevt9KkKmRSGH?= =?utf-8?q?JrXHCdbEARjmjvCxszMyhqc+wMH5r0/E1o8EPOe8Vu0jxNkU9dWfbkL2PDkue5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7?= =?utf-8?q?aBmcTs+8Y7ZHOu2JbbOUMRDSLyni4yJeLRiUILLulJp9Lh8K+19iu5lasHT+b7rgR?= =?utf-8?q?kF2dz9mlPotHbPz4+MQh+dGCxpmVq3Fj4vopPL7KTVDvOC74y6gkyjV0EIFGtQGiB?= =?utf-8?q?RvPpYB4Oh4ySFqcHnLutsj9CzIZrrIGj9nth2tlpI33T+wx8Ngeq2AlxAU2cbZ5Ok?= =?utf-8?q?iiYyyJUU9W2x?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: b1cca46b-bed8-44f9-9851-08db21499e04 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2023 09:27:07.2050 (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: XH5omlsjhvDEZuK75wCgzGr8ktzMHeorS+c5i5Kr/5l/n8LSzU7Owq9eE/nUSX8fGcw8CtvQTfNfgkGzSsPoXQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9464 X-Spam-Status: No, score=-3028.2 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759972361493303350?= X-GMAIL-MSGID: =?utf-8?q?1759972361493303350?= |
Series |
RISC-V/gas: insn operand parsing
|
|
Checks
Context | Check | Description |
---|---|---|
snail/binutils-gdb-check | success | Github commit url |
Commit Message
Jan Beulich
March 10, 2023, 9:27 a.m. UTC
With my_getSmallExpression() consistently and silently failing on relocation operators not fitting an insn, it is no longer necessary to hand it percent_op_itype[] "just in case" (i.e. to avoid errors when a subsequent parsing attempt for another operand combination might succeed). This also eliminates the latent problem of percent_op_itype[] and percent_op_stype[] growing a non-identical set of recognized relocation operators. --- v2: New.
--- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -2517,7 +2517,7 @@ riscv_ip (char *str, struct riscv_cl_ins imm_expr->X_op = O_absent; *imm_reloc = BFD_RELOC_UNUSED; - p = percent_op_itype; + p = percent_op_null; for (oparg = insn->args;; ++oparg) { @@ -3233,7 +3233,6 @@ riscv_ip (char *str, struct riscv_cl_ins p = percent_op_rtype; goto alu_op; case '0': /* AMO displacement, which must be zero. */ - p = percent_op_null; load_store: if (riscv_handle_implicit_zero_offset (imm_expr, asarg)) continue;