[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87bkphr3o1.fsf@all.your.base.are.belong.to.us>
Date: Tue, 08 Nov 2022 14:12:14 +0100
From: Björn Töpel <bjorn@...nel.org>
To: "liaochang (A)" <liaochang1@...wei.com>,
Xim <chenguokai17@...ls.ucas.ac.cn>
Cc: paul.walmsley@...ive.com, palmer@...belt.com,
aou@...s.berkeley.edu, rostedt@...dmis.org, mingo@...hat.com,
sfr@...b.auug.org.au, linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org, Liao Chang <liaoclark@....com>
Subject: Re: [PATCH v4 0/8] Add OPTPROBES feature on RISCV
"liaochang (A)" <liaochang1@...wei.com> writes:
>>>> + *rd = ((kw | ow) == 1UL) ? 0 : __builtin_ctzl((kw | ow) & ~1UL);
>>>> + *ra = (kw == 1UL) ? 0 : __builtin_ctzl(kw & ~1UL);
>>>
>>> Hmm, __builtin_ctzl is undefined for 0, right? Can that be triggered
>>> here?
>
> This corner case has been taken into account, look these condition parts,
> if kw == 1UL this expression will return 0 directly, no chance to invoke __builtin_ctzl.
Indeed! Thanks for making that clear! Looking forward to the next
revision!
Björn
Powered by blists - more mailing lists