From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ECD2DECAAD5 for ; Mon, 5 Sep 2022 20:46:51 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4MM0tf0kvqz3c5B for ; Tue, 6 Sep 2022 06:46:50 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.crashing.org (client-ip=63.228.1.57; helo=gate.crashing.org; envelope-from=segher@kernel.crashing.org; receiver=) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lists.ozlabs.org (Postfix) with ESMTP id 4MM0tC3ZR8z2ypV for ; Tue, 6 Sep 2022 06:46:27 +1000 (AEST) 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" 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-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "aik@ozlabs.ru" , "chenzhongjin@huawei.com" , "linux-kernel@vger.kernel.org" , "peterz@infradead.org" , "mingo@redhat.com" , "rostedt@goodmis.org" , "npiggin@gmail.com" , "jpoimboe@redhat.com" , Sathvika Vasireddy , "mbenes@suse.cz" , "linuxppc-dev@lists.ozlabs.org" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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