From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id 3B29D3857014 for ; Sat, 1 Jul 2023 05:22:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3B29D3857014 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-31427ddd3fbso935157f8f.0 for ; Fri, 30 Jun 2023 22:22:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1688188959; x=1690780959; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=i3butRJ77aMFP6Jkbv3ky3n416bM5YldxRSIJ94tmpE=; b=Ii8sPWLq9N/WOyOtS4AMA9Z3hLouN9fmmEcF+QMDTK257BHbg875psjfVG+m/U9nON 9G/3iZIsMOD6EazRMJEgLFz6YAX8kk3cEdJ+GNiQKi9nNmTxb19KFAZ/7oE9BUfy6Swp FJW/ZCQP+TgSRJoQPAuO+9IwU5xH/SmsUVLa9gKnt3+Xg2o1xoDY45qbDj99XydXGi+d oAo1aYgFDwOt0d8Qzs5mErX3jJLomH1u5qiiztIX0MN9jILaDQAiQ8SyDpb8MJhltZwV bRgfufOruCq3Y8hA2EiDJl3Gr0mJ6nZJYqAtvFLlHYvkk/r2n6hobsd1HZrEDiz1uydR 6g8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688188959; x=1690780959; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i3butRJ77aMFP6Jkbv3ky3n416bM5YldxRSIJ94tmpE=; b=XkVi3dmYXQ8tMGwahuRZxjp+Zo6b5HnDuxP/wdZnv9a5BeSOzszyjjEK3lqTy0KXC3 TNIKWAtqK4FHDKS2o4AkQW+QGhRCsBmf4GACIx4Zx2wI7iz8tw4U6a3XgIxyEqsDLqCL 1QVtK6hX4xmq+ehJPfuiQxonePNnKe/31y/xA9/PNDxa4GsQGbGEBqitmfX7CTVG5n65 DIRzJiHMTGYeY00/9AnfpLSrNKaJwCx/ILt+DyMKVWMx4caEekNJKKT5gepUoyaOta1Q Ebm/OIL3U37CJSAm3SYeFy3nV+9nPnDRvmngEMT0gFr7UL8yC0PAeT0O41TZqqlnF9mu /4EQ== X-Gm-Message-State: ABy/qLYUGJ1Jm3W1yLFUwIRLzyh46dt3XANVecEunCVtyuzhX5vZJBjX NnBqvQOjbgykYiTUXVbNEamkNqQaJhvcopwrcr1l+g== X-Google-Smtp-Source: APBJJlGzUQGdYkBbLKr1HXL+GK14/g2p5FqTvF0tEGqa/UPUMrioPBFD6df2XKAyuIGkP8+YH+iECH6NpnRQiIyEHeo= X-Received: by 2002:adf:e887:0:b0:313:e613:6f86 with SMTP id d7-20020adfe887000000b00313e6136f86mr3363813wrm.38.1688188958989; Fri, 30 Jun 2023 22:22:38 -0700 (PDT) MIME-Version: 1.0 References: <20230629171839.573187-1-nhuck@google.com> <20230629171839.573187-10-nhuck@google.com> <91af0cee-baf3-fea1-9364-db269a232051@gmail.com> <346ebb6d-a65a-214e-2ab9-66844b463b03@gmail.com> In-Reply-To: <346ebb6d-a65a-214e-2ab9-66844b463b03@gmail.com> From: =?UTF-8?Q?Christoph_M=C3=BCllner?= Date: Sat, 1 Jul 2023 07:22:24 +0200 Message-ID: Subject: Re: [PATCH 09/14] Allow nested implications for extensions. To: Jeff Law Cc: Nathan Huckleberry , binutils@sourceware.org, nhuck@pmull.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no 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 Sat, Jul 1, 2023 at 12:24=E2=80=AFAM Jeff Law wr= ote: > > > > On 6/30/23 15:53, Christoph M=C3=BCllner wrote: > > On Fri, Jun 30, 2023 at 10:45=E2=80=AFPM Jeff Law via Binutils > > wrote: > >> > >> > >> > >> On 6/29/23 11:18, Nathan Huckleberry via Binutils wrote: > >>> Certain extensions require two levels of implications. For example, > >>> zvkng implies zvkn and zvkn implies zvkned. Enabling zvkng should al= so > >>> enable zvkned. > >>> > >>> This patch fixes this behavior. > >>> > >>> Signed-off-by: Nathan Huckleberry > >>> --- > >>> bfd/elfxx-riscv.c | 16 ++++++++++++++-- > >>> 1 file changed, 14 insertions(+), 2 deletions(-) > >> No problem with the actual code. I would suggest a comment explicitly > >> stating this only allows two levels rather than arbitrary levels of ne= sting. > > > > If I read the resulting code correctly, then arbitrary nesting should > > be possible. > > Whenever an implicit subset is found and added, `finished` will be set = to false, > > `t` will be reset to the initial value and the inner loop will terminat= e. > > The outer loop will start over because `finished` is false. > > Do I miss something? > This is making my brain hurt, too late on a Friday afternoon to think. > I should just put it under the debugger (the downside of trying to > review code for a hands-on learner), but I don't have the time right > now. ISTM there needs to be a worklist of things we've found that we > then need to scan. > > But I'll trust you on this, you're a lot more familiar with this code in > general than I am. > > I wouldn't lose any sleep if you fixed formatting in this code. We're > supposed to be using GNU style. So the open curley on the IF statement > should be on its own line, indented twice (which implies the code in the > TRUE arm ought to be reindented) and the close curley should line up > with the open curley. I tested all patches with check_GNU_style.sh and it only found what you have commented here. Since nobody has pushed this series so far, I have updated the code and sent out a v6 which can also be found here: https://github.com/cmuellner/binutils-gdb/tree/riscv-zvk-v6 Thanks, Christoph > > > >