[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d815be50-93bd-8cdb-bc12-b1103345aa1e@csgroup.eu>
Date: Tue, 6 Sep 2022 06:22:09 +0000
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Segher Boessenkool <segher@...nel.crashing.org>,
"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
CC: "aik@...abs.ru" <aik@...abs.ru>,
"chenzhongjin@...wei.com" <chenzhongjin@...wei.com>,
"jpoimboe@...hat.com" <jpoimboe@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"mbenes@...e.cz" <mbenes@...e.cz>,
"mingo@...hat.com" <mingo@...hat.com>,
"npiggin@...il.com" <npiggin@...il.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
Sathvika Vasireddy <sv@...ux.ibm.com>
Subject: Re: [PATCH v2 16/16] objtool/powerpc: Add --mcount specific
implementation
Le 05/09/2022 à 22:43, Segher Boessenkool a écrit :
> 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 :-)
>
By the way, I proposed a cleanup patch that handles it, see
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/ebe11b73d1015a17034a2c4bedf093fa57f5d29f.1662032631.git.christophe.leroy@csgroup.eu/
Christophe
Powered by blists - more mailing lists