From: Petar Jovanovic pet...@mips.com
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
On Tue, Dec 4, 2012 at 2:49 PM, Petar Jovanovic
petar.jovano...@rt-rk.com wrote:
From: Petar Jovanovic pet...@mips.com
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
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;
rs5_0 =
On Tue, Dec 4, 2012 at 7:43 PM, Richard Henderson r...@twiddle.net 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
On Tue, Dec 4, 2012 at 7:48 PM, Jovanovic, Petar pet...@mips.com 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,
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,
From: Andreas Färber [afaer...@suse.de]
FWIW you could use our unlikely() macro then to aid branch prediction.
Just did. Thanks.
Petar
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 edge