From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uscf1-0007oT-Dg for qemu-devel@nongnu.org; Fri, 28 Jun 2013 13:40:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uscey-00083B-JW for qemu-devel@nongnu.org; Fri, 28 Jun 2013 13:40:39 -0400 Received: from mail-gh0-x22b.google.com ([2607:f8b0:4002:c05::22b]:43306) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uscey-00082m-9u for qemu-devel@nongnu.org; Fri, 28 Jun 2013 13:40:36 -0400 Received: by mail-gh0-f171.google.com with SMTP id f15so922946ghb.2 for ; Fri, 28 Jun 2013 10:40:35 -0700 (PDT) Sender: Richard Henderson Message-ID: <51CDCA8D.6000200@twiddle.net> Date: Fri, 28 Jun 2013 10:40:29 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1369229701-87540-1-git-send-email-petar.jovanovic@rt-rk.com>, <56EA75BA695AE044ACFB41322F6D2BF402230260@BADAG02.ba.imgtec.org> <56EA75BA695AE044ACFB41322F6D2BF4022320A1@BADAG02.ba.imgtec.org>, <51CC8271.6040204@twiddle.net> <56EA75BA695AE044ACFB41322F6D2BF4022385D9@BADAG02.ba.imgtec.org> In-Reply-To: <56EA75BA695AE044ACFB41322F6D2BF4022385D9@BADAG02.ba.imgtec.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target-mips: fix mipsdsp_trunc16_sat16_round List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Petar Jovanovic Cc: Petar Jovanovic , "aurelien@aurel32.net" , "qemu-devel@nongnu.org" On 06/27/2013 02:48 PM, Petar Jovanovic wrote: >> This doesn't look right either, as it doesn't properly check for overflow of >> negative values. > > What overflow of negative values? > Can you please list the values for which the result would not be correct? Hmm, I suppose since we're always rounding to +INF, we can't overflow in the negative direction. The patch could use some commentary along those lines... r~