From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 63F7A384D1BE for ; Thu, 6 Oct 2022 09:52:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 63F7A384D1BE Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=irq.a4lg.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=irq.a4lg.com Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 358C9300089; Thu, 6 Oct 2022 09:52:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1665049949; bh=PrdtdERMwnWEmDxnD6UaGeWakQF23CPcI3Xn8iyY1Wk=; h=Message-ID:Date:Mime-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=B1FJOpBwstnkWD0P5BskzigkuicbsGLM0sxUp3fW90QExdTtrmdAP+XV4WQ45qpJV tUwem7So7FfdB4F/hx2xYEuinPOtE4oDp6/581g8m5579zP+IaTobXVEPy7vpH6fxX dFSyb1gGv6/DgEooYeuZo3/MJp2FiQytEkIjhL3Y= Message-ID: <3c70ee9b-0ece-89df-86f5-d2b2501bdd84@irq.a4lg.com> Date: Thu, 6 Oct 2022 18:52:27 +0900 Mime-Version: 1.0 Subject: Re: [PATCH v2 1/2] RISC-V: Fallback for instructions longer than 64b Content-Language: en-US To: Jan Beulich Cc: binutils@sourceware.org References: <1834abf4-a48d-8712-f4dd-cf8434a009f7@suse.com> From: Tsukasa OI In-Reply-To: <1834abf4-a48d-8712-f4dd-cf8434a009f7@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 List-Id: On 2022/10/06 17:22, Jan Beulich wrote: > On 06.10.2022 06:40, Tsukasa OI via Binutils wrote: >> We don't support instructions longer than 64-bits yet. Still, we can >> modify validate_riscv_insn function to prevent unexpected behavior by >> limiting the "length" of an instruction to 64-bit (or less). >> >> gas/ChangeLog: >> >> * config/tc-riscv.c (validate_riscv_insn): Fix function >> description comment based on current usage. Limit instruction >> length up to 64-bit for now. Make sure that required_bits does >> not corrupt even if unsigned long long is longer than 64-bit. > > While I agree with the code change, I don't agree with the adjustment > to the comment - you're changing it to match the sole present caller, > but imo such a comment ought to describe the behavior of the function > irrespective of how it's used at any given point in time. > > Jan > Okay, I revised the comment to reflect the specification itself. Thanks, Tsukasa