Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3547379rwb; Mon, 5 Sep 2022 13:54:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR4LEw98e8OeSOEwKrGIJaT72NfLFBkaxzElYQlZxuGLYzULmcVFSCHBBKohyD5pMv4O+sPS X-Received: by 2002:a17:906:5d0f:b0:732:fb97:780d with SMTP id g15-20020a1709065d0f00b00732fb97780dmr37696770ejt.269.1662411286759; Mon, 05 Sep 2022 13:54:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662411286; cv=none; d=google.com; s=arc-20160816; b=tOAhSo4nBmtFghQSLD2wO8QimMX1H6u4wxzmalPV0VoFsnGCxU3bsTip7zWmi6RWpp sBBlkxCbkRPomSmbZE6VLki/OHx3m/9ecDJppp91sSNe4swCSXioFFgB/85oPqgRf99v b7Le/4JCcfToFDchbbx/wQUoRMSJgeJQV6n6QM0R2pve1XHCQYxofxa29FjYyNDXUD3E kqJCKHOOEM+WgN3UWCscsTHwcmqlouJZsXOEJX9qtDCJyGSXHWz3AgwucZkmCcwqFFe+ uVGdLAS83WADevFvt1kx6MtiU9unLRNY9TH51rokhndhAC/jFk09iB4Jl3Na5b2PBuMF MVXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=7Igg1/cNO+sm1imDnAKcuyneG94AFp2z4zBjYrwtDgo=; b=NfzzHDPTf6ugXztXkQEG/K2iI4oQvrFEs6Tob4PvHlyzZ0WJnI+l76huzROGG9mVHi Z2dpgbdIT7+P0I66QyrpKik2JXW/gLop+SjRcWL9+VI50JvVYQBVbxSmAlcePLjO7Iuc 5WOm/Ob3a5iMwOA/lq1Wl9aOACDqb4La3+DP95/2XtB0abtDumOuASv5eQFDTLc3CDc2 nqnkhAYQwmOjt0Jc77bpahDwYbQnsVzGvE7/m7A9vvwsB5Inwab2fM/dXkatk0azE24i PcblNYWVXvh8tbvF2wDx26nWsXTJbrlJGrmteMf86WHGXabn7DTWJo7Md+Xo1FcOnTv4 07Ww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wu4-20020a170906eec400b0073c0a523ddcsi9964969ejb.405.2022.09.05.13.54.21; Mon, 05 Sep 2022 13:54:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231928AbiIEUtl (ORCPT + 99 others); Mon, 5 Sep 2022 16:49:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229762AbiIEUti (ORCPT ); Mon, 5 Sep 2022 16:49:38 -0400 Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EB3D612AB5 for ; Mon, 5 Sep 2022 13:49:36 -0700 (PDT) Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 285Kh2e6003034; Mon, 5 Sep 2022 15:43:03 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 285Kh1Aa003033; Mon, 5 Sep 2022 15:43:01 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 5 Sep 2022 15:43:00 -0500 From: Segher Boessenkool To: "Naveen N. Rao" Cc: Christophe Leroy , "aik@ozlabs.ru" , "chenzhongjin@huawei.com" , "jpoimboe@redhat.com" , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "mbenes@suse.cz" , "mingo@redhat.com" , "npiggin@gmail.com" , "peterz@infradead.org" , "rostedt@goodmis.org" , Sathvika Vasireddy Subject: Re: [PATCH v2 16/16] objtool/powerpc: Add --mcount specific implementation Message-ID: <20220905204300.GC25951@gate.crashing.org> References: <20220829055223.24767-1-sv@linux.ibm.com> <20220829055223.24767-17-sv@linux.ibm.com> <5da86617-53f1-d899-336a-53fe691e76ae@csgroup.eu> <20220831175100.GS25951@gate.crashing.org> <1662374555.7eoowv9twf.naveen@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1662374555.7eoowv9twf.naveen@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! On Mon, Sep 05, 2022 at 04:15:07PM +0530, Naveen N. Rao wrote: > Segher Boessenkool wrote: > >>> + if ((insn & 3) == 1) { > >>> + *type = INSN_CALL; > >>> + *immediate = insn & 0x3fffffc; > >>> + if (*immediate & 0x2000000) > >>> + *immediate -= 0x4000000; > >>> + } > >>> + break; > >>> + } > > > >Does this handle AA=1 correctly at all? That is valid both with and > >without relocations, just like AA=0. Same for AA=1 LK=0 btw. > > > >If you only handle AA=0, the code should explicitly test for that. > > The code does test for AA=0 LK=1 with the if statement there? Yes, but that is not what I said :-) It may be fine to not *handle* AA=1 at all, but the code should at least scream bloody murder when it encounters it anyway :-) Segher