On 2012-12-04 13:00, Blue Swirl wrote:
>> > +if (rs5_0 == 0)
>> > +return;
> The check should be moved to translation time so that the call to this
> helper is not generated at all.
No, we'd do that only if this value were an immediate.
Branch over helper is not an optimization for an
> From: Andreas Färber [afaer...@suse.de]
>FWIW you could use our unlikely() macro then to aid branch prediction.
Just did. Thanks.
Petar
Am 04.12.2012 20:48, schrieb Jovanovic, Petar:
>> diff --git a/target-mips/dsp_helper.c b/target-mips/dsp_helper.c
>> index e7949c2..f8a7a9f 100644
>> --- a/target-mips/dsp_helper.c
>> +++ b/target-mips/dsp_helper.c
>> @@ -3814,17 +3814,17 @@ void helper_shilo(target_ulong ac, target_ulong rs,
>>
On Tue, Dec 4, 2012 at 7:48 PM, Jovanovic, Petar wrote:
>> diff --git a/target-mips/dsp_helper.c b/target-mips/dsp_helper.c
>> index e7949c2..f8a7a9f 100644
>> --- a/target-mips/dsp_helper.c
>> +++ b/target-mips/dsp_helper.c
>> @@ -3814,17 +3814,17 @@ void helper_shilo(target_ulong ac, target_ulon
On Tue, Dec 4, 2012 at 7:43 PM, Richard Henderson wrote:
> On 2012-12-04 13:00, Blue Swirl wrote:
>>> > +if (rs5_0 == 0)
>>> > +return;
>> The check should be moved to translation time so that the call to this
>> helper is not generated at all.
>
> No, we'd do that only if this value w
> diff --git a/target-mips/dsp_helper.c b/target-mips/dsp_helper.c
> index e7949c2..f8a7a9f 100644
> --- a/target-mips/dsp_helper.c
> +++ b/target-mips/dsp_helper.c
> @@ -3814,17 +3814,17 @@ void helper_shilo(target_ulong ac, target_ulong rs,
> CPUMIPSState *env)
>
> rs5_0 = rs & 0x3F;
>
On Tue, Dec 4, 2012 at 2:49 PM, 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 check for reg
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