Date: Thu, 01 Dec 2022 09:51:32 +0800 In-Reply-To: <20221125144309.gg25...@gate.crashing.org> (Segher Boessenkool's message of "Fri, 25 Nov 2022 08:43:09 -0600") Message-ID: <7ewn7bx55n....@pike.rch.stglabs.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
Segher Boessenkool <seg...@kernel.crashing.org> writes: > Hi guys, > > On Fri, Nov 25, 2022 at 04:11:49PM +0800, Kewen.Lin wrote: >> on 2022/10/26 19:40, Jiufu Guo wrote: cut... >> > + >> > + HOST_WIDE_INT imm = (ud1 & 0x8000) ? ((ud1 ^ 0x8000) - 0x8000) >> > + : ((ud2 << 16) - 0x80000000); > > We really should have some "hwi::sign_extend (ud1, 16)" helper function, > heh. Maybe there already is? Ah, "sext_hwi". Fixing that up > everywhere in this function is preapproved. I just submit a patch to use sext_hwi for existing code: https://gcc.gnu.org/pipermail/gcc-patches/2022-December/607588.html Thanks for your help and spend time on this! BR, Jeff (Jiufu) > >> > + else cut... > > Could you comment what exact instructions are expected? > li;xoris and li;xoris and lis;xoris I guess? It helps if you just tell > the reader here. > > The li;oris and li;xoris parts look good. > > > Segher