From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMNv4-0000fe-Lu for qemu-devel@nongnu.org; Mon, 03 Aug 2015 18:09:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMNv3-0000KQ-TT for qemu-devel@nongnu.org; Mon, 03 Aug 2015 18:09:18 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:37152) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMNv3-0000KM-NA for qemu-devel@nongnu.org; Mon, 03 Aug 2015 18:09:17 -0400 Date: Tue, 4 Aug 2015 00:09:15 +0200 From: Aurelien Jarno Message-ID: <20150803220915.GG30591@aurel32.net> References: <1438627752-19903-2-git-send-email-rth@twiddle.net> <1438630553-21240-1-git-send-email-rth@twiddle.net> <20150803213128.GA19612@aurel32.net> <55BFE019.2080504@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55BFE019.2080504@twiddle.net> Subject: Re: [Qemu-devel] [PATCH v2 1/3] target-mips: Copy restrictions from ext/ins to dext/dins List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: leon.alrae@imgtec.com, qemu-devel@nongnu.org On 2015-08-03 14:41, Richard Henderson wrote: > On 08/03/2015 02:31 PM, Aurelien Jarno wrote: > >On 2015-08-03 12:35, Richard Henderson wrote: > >> if (msb != 31) { > >>- tcg_gen_andi_tl(t0, t0, (1 << (msb + 1)) - 1); > >>+ tcg_gen_andi_tl(t0, t0, (1U << (msb + 1)) - 1); > > > >Is this change really needed? > > msb == 30 means 1 << 31. Which officially must be unsigned to be correct. > If we were to run under ubsan, this would trigger an error. Ok. > >Note that DEXT can't fail as both lsb and msb are in the range 0..31. > >DEXTU and DEXTM can. > ... > >The same way DINSM can't fail. > > Yes, I know. But it seems cleaner to do the checks always, unifying all of > the code. Agreed. > >Should we try to get this one into 2.4, if not already too late? > > Perhaps. Otherwise via stable after the fact. Ok. Leon, do you have other pending patches for 2.4/2.4.1? The semihosting microMIPS R6 one maybe? -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net