Re: [Qemu-devel] [PATCH] target-mips: fix mipsdsp_trunc16_sat16_round

2013-06-30 Thread Petar Jovanovic
From: Richard Henderson [rth7...@gmail.com] on behalf of Richard Henderson [r...@twiddle.net] Sent: Friday, June 28, 2013 7:40 PM To: Petar Jovanovic Cc: Petar Jovanovic; qemu-devel@nongnu.org; aurel...@aurel32.net Subject: Re: [Qemu-devel] [PATCH] target

Re: [Qemu-devel] [PATCH] target-mips: fix mipsdsp_trunc16_sat16_round

2013-06-28 Thread Richard Henderson
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 ro

Re: [Qemu-devel] [PATCH] target-mips: fix mipsdsp_trunc16_sat16_round

2013-06-27 Thread Petar Jovanovic
] target-mips: fix mipsdsp_trunc16_sat16_round On 06/17/2013 03:39 PM, Petar Jovanovic wrote: > -int64_t temp; > - > -temp = (int32_t)a + 0x8000; > +uint16_t temp; > > -if (a > (int)0x7fff8000) { > -temp = 0x7FFF; > +if (a > 0x7FFF7F

Re: [Qemu-devel] [PATCH] target-mips: fix mipsdsp_trunc16_sat16_round

2013-06-27 Thread Richard Henderson
On 06/17/2013 03:39 PM, Petar Jovanovic wrote: > -int64_t temp; > - > -temp = (int32_t)a + 0x8000; > +uint16_t temp; > > -if (a > (int)0x7fff8000) { > -temp = 0x7FFF; > +if (a > 0x7FFF7FFF) { > +temp = 0x7FFF; > set_DSPControl_overflow_flag(1, 2

Re: [Qemu-devel] [PATCH] target-mips: fix mipsdsp_trunc16_sat16_round

2013-06-25 Thread Petar Jovanovic
ping From: Petar Jovanovic Sent: Tuesday, June 18, 2013 12:39 AM To: Petar Jovanovic; qemu-devel@nongnu.org Cc: aurel...@aurel32.net Subject: RE: [PATCH] target-mips: fix mipsdsp_trunc16_sat16_round ping From: Petar

Re: [Qemu-devel] [PATCH] target-mips: fix mipsdsp_trunc16_sat16_round

2013-06-17 Thread Petar Jovanovic
ping From: Petar Jovanovic Sent: Sunday, June 09, 2013 4:34 AM To: Petar Jovanovic; qemu-devel@nongnu.org Cc: aurel...@aurel32.net Subject: RE: [PATCH] target-mips: fix mipsdsp_trunc16_sat16_round ping http://patchwork.ozlabs.org/patch/245624/

Re: [Qemu-devel] [PATCH] target-mips: fix mipsdsp_trunc16_sat16_round

2013-06-08 Thread Petar Jovanovic
ping http://patchwork.ozlabs.org/patch/245624/ From: Petar Jovanovic [petar.jovano...@rt-rk.com] Sent: Wednesday, May 22, 2013 3:35 PM To: qemu-devel@nongnu.org Cc: Petar Jovanovic; aurel...@aurel32.net Subject: [PATCH] target-mips: fix mipsdsp_trunc16_sat1

[Qemu-devel] [PATCH] target-mips: fix mipsdsp_trunc16_sat16_round

2013-05-22 Thread Petar Jovanovic
From: Petar Jovanovic This change corrects rounding and saturation of Q31 fractional value in mipsdsp_trunc16_sat16_round(). Overflow detection was incorrect for the corner case for PRECRQ_RS.PH, and this test case is also part of the change. Signed-off-by: Petar Jovanovic --- target-mips/dsp_