From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id 982353883011 for ; Fri, 30 Jun 2023 22:24:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 982353883011 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1b7fb1a82c4so14818045ad.1 for ; Fri, 30 Jun 2023 15:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688163848; x=1690755848; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=WZaNp+vpKfaqxu17nY8Lmug+Bw+gI9PfJzC1a+Ipl8M=; b=TQyYmHYH8BBzU4PeH6mDIDNLFaVtegA0Uo/Pr1GjXL3QvZZQhhlBQfL0Mi8pyi7iQX V8EU+YsYdREvlHirr8hbKNBXgTkYWdVhWJzRyqczmrSIPez18+xyVK247KYX92YhVw29 MKt0g8pNsPuagtCr3Op5IdCjM8L09VsmyX5BRl0sCakrY6nTALQQ9bY98SnrRQOtHjVz kC023wHOPx//1HBhaJ4qmi3vuvEJZ4DmJ7GKQQqtdpKdOAXqTeyIQul9S/OGOtCETQkW p6SBTgy7PPHNfW4Dz2xhUuUrLU2FsRYICFojQ+igQJ/19rhJUEIkawSqKuDIKkI4PnkX mGGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688163848; x=1690755848; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WZaNp+vpKfaqxu17nY8Lmug+Bw+gI9PfJzC1a+Ipl8M=; b=AoHfNoDiRL0Kg50pRq6rOHFZHBRSqHf9/Kze9wBsYuad3sTCI8SsoR3FKtdrSBycWn zY8U2rz0d/4M8ek+432+XL/kPobDcl5gA1RAhtClcHQCM5Cbj2XY0q4AkrGuyImEUsHm PuG/RbHmmsrYX2ovYZ6b7XGBqhzuuVAdqRz6acrwovOPLY+op88ycQE8zSqpSiYZl5yb Ynv7oBvchxD7tFhgeYrFv9jOKxPaK+mMMmiRTTx8DOCXJn5q+jJk4+gpoLPaBOs0N7RT 0Yz2w8b4KbqW+W6GWEwkIa7s5QLtmhqq/c7O/5fZFt11BR/+xIzs8EqOe/rqiFzev1lw CVeA== X-Gm-Message-State: ABy/qLYeJGHWzaOkwCIIehoXwIG2999DicTyhqEef7D9iwORTjKPCYvA HDNdEu+V/ketqRPVvgTSbYo= X-Google-Smtp-Source: APBJJlHSXeai9dUBeN4dva/e2yYYKdBqHqLMwUdmpDpIcxC+Hd6+kA/ehlhRWjHnXAAidj7WLavMtQ== X-Received: by 2002:a17:902:ab81:b0:1b8:21f:bcc2 with SMTP id f1-20020a170902ab8100b001b8021fbcc2mr2457735plr.34.1688163848525; Fri, 30 Jun 2023 15:24:08 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id f2-20020a170902ce8200b001b87ee2a276sm135685plg.11.2023.06.30.15.24.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Jun 2023 15:24:08 -0700 (PDT) Message-ID: <346ebb6d-a65a-214e-2ab9-66844b463b03@gmail.com> Date: Fri, 30 Jun 2023 16:24:06 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 09/14] Allow nested implications for extensions. Content-Language: en-US To: =?UTF-8?Q?Christoph_M=c3=bcllner?= Cc: Nathan Huckleberry , binutils@sourceware.org, nhuck@pmull.org References: <20230629171839.573187-1-nhuck@google.com> <20230629171839.573187-10-nhuck@google.com> <91af0cee-baf3-fea1-9364-db269a232051@gmail.com> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 List-Id: On 6/30/23 15:53, Christoph Müllner wrote: > On Fri, Jun 30, 2023 at 10:45 PM 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 also >>> 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 nesting. > > 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 terminate. > 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. Jeff