Re: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV

2012-12-06 Thread Aurelien Jarno
On Wed, Dec 05, 2012 at 04:38:22PM +, Peter Maydell wrote: > On 5 December 2012 15:51, Richard Henderson wrote: > > On 2012-12-05 09:49, Peter Maydell wrote: > >> On 5 December 2012 15:36, Richard Henderson wrote: > >>> On 2012-12-04 17:29, Petar Jovanovic wrote: > rs5_0 = (int8_t)(

Re: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV

2012-12-06 Thread Aurelien Jarno
On Wed, Dec 05, 2012 at 12:29:10AM +0100, Petar Jovanovic wrote: > From: Petar Jovanovic > > helper_shilo has not been shifting an accumulator value correctly for negative > values in 'shift' field. Minor optimization for shift=0 case. > This change also adds tests that will trigger issue and che

Re: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV

2012-12-05 Thread Johnson, Eric
_ > From: Johnson, Eric > Sent: Wednesday, December 05, 2012 10:36 PM > To: Jovanovic, Petar; qemu-devel@nongnu.org > Cc: blauwir...@gmail.com; rth7...@gmail.com; afaer...@suse.de; > aurel...@aurel32.net > Subject: RE: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for >

Re: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV

2012-12-05 Thread Jovanovic, Petar
..@suse.de; aurel...@aurel32.net Subject: RE: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV Oops, I forgot. The contents are OK but 'git am' didn't like the patch. patch had to use fuzz. This may need to be rebased to latest master. -Eric

Re: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV

2012-12-05 Thread Richard Henderson
On 2012-12-05 10:38, Peter Maydell wrote: > I don't think we should block this patch on that general > cleanup, though. All the sign extensions in target-mips/translate.c > are done in the double-shift way, so this is consistent with > the existing code. Fair enough. The original can have my Re

Re: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV

2012-12-05 Thread Johnson, Eric
=mips@nongnu.org] On Behalf Of Johnson, Eric > Sent: Wednesday, December 05, 2012 12:42 PM > To: Jovanovic, Petar; qemu-devel@nongnu.org > Cc: blauwir...@gmail.com; rth7...@gmail.com; afaer...@suse.de; > aurel...@aurel32.net > Subject: Re: [Qemu-devel] [PATCH v2] target-mips: Fix

Re: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV

2012-12-05 Thread Johnson, Eric
novic, Petar; rth7...@gmail.com; > afaer...@suse.de; aurel...@aurel32.net > Subject: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for > SHILO and SHILOV > > From: Petar Jovanovic > > helper_shilo has not been shifting an accumulator value correctly for > negative >

Re: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV

2012-12-05 Thread Peter Maydell
On 5 December 2012 15:51, Richard Henderson wrote: > On 2012-12-05 09:49, Peter Maydell wrote: >> On 5 December 2012 15:36, Richard Henderson wrote: >>> On 2012-12-04 17:29, Petar Jovanovic wrote: rs5_0 = (int8_t)(rs5_0 << 2) >> 2; >>> >>> This is more portably written as >>> >>> rs5_

Re: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV

2012-12-05 Thread Richard Henderson
On 2012-12-05 09:49, Peter Maydell wrote: > On 5 December 2012 15:36, Richard Henderson wrote: >> On 2012-12-04 17:29, Petar Jovanovic wrote: >>> rs5_0 = (int8_t)(rs5_0 << 2) >> 2; >> >> This is more portably written as >> >> rs5_0 = (rs5_0 ^ 0x20) - 0x20; > > ...but way more obscurely. If

Re: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV

2012-12-05 Thread Peter Maydell
On 5 December 2012 15:36, Richard Henderson wrote: > On 2012-12-04 17:29, Petar Jovanovic wrote: >> rs5_0 = (int8_t)(rs5_0 << 2) >> 2; > > This is more portably written as > > rs5_0 = (rs5_0 ^ 0x20) - 0x20; ...but way more obscurely. If we want to play that kind of game can we have a sign-

Re: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV

2012-12-05 Thread Richard Henderson
On 2012-12-04 17:29, Petar Jovanovic wrote: > rs5_0 = (int8_t)(rs5_0 << 2) >> 2; This is more portably written as rs5_0 = (rs5_0 ^ 0x20) - 0x20; r~

[Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV

2012-12-04 Thread Petar Jovanovic
From: Petar Jovanovic helper_shilo has not been shifting an accumulator value correctly for negative values in 'shift' field. Minor optimization for shift=0 case. This change also adds tests that will trigger issue and check for regressions. Signed-off-by: Petar Jovanovic --- target-mips/dsp_h