Patchwork target-mips: fix incorrect test for MTHLIP

login
register
mail settings
Submitter Petar Jovanovic
Date Jan. 23, 2013, 3:17 a.m.
Message ID <1358911061-32666-1-git-send-email-petar.jovanovic@rt-rk.com>
Download mbox | patch
Permalink /patch/214718/
State New
Headers show

Comments

Petar Jovanovic - Jan. 23, 2013, 3:17 a.m.
The pos field in the DSPControl register is not correctly initialized.
Per documentation, the result of MTHLIP is unpredictable if the value of the
pos field before the execution is greater than 32.

Signed-off-by: Petar Jovanovic <petarj@mips.com>
---
 tests/tcg/mips/mips32-dsp/mthlip.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Aurelien Jarno - Jan. 31, 2013, 11:01 p.m.
On Wed, Jan 23, 2013 at 04:17:41AM +0100, Petar Jovanovic wrote:
> The pos field in the DSPControl register is not correctly initialized.
> Per documentation, the result of MTHLIP is unpredictable if the value of the
> pos field before the execution is greater than 32.
> 
> Signed-off-by: Petar Jovanovic <petarj@mips.com>
> ---
>  tests/tcg/mips/mips32-dsp/mthlip.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/tests/tcg/mips/mips32-dsp/mthlip.c b/tests/tcg/mips/mips32-dsp/mthlip.c
> index 9549aae..85f94d8 100644
> --- a/tests/tcg/mips/mips32-dsp/mthlip.c
> +++ b/tests/tcg/mips/mips32-dsp/mthlip.c
> @@ -30,7 +30,7 @@ int main()
>      assert(ach == resulth);
>      assert(acl == resultl);
>  
> -    dsp = 0x3f;
> +    dsp = 0x1f;
>      ach = 0x05;
>      acl = 0xB4CB;
>      rs  = 0x00FFBBAA;
> -- 
> 1.7.5.4
> 
> 

Thanks, applied.

Patch

diff --git a/tests/tcg/mips/mips32-dsp/mthlip.c b/tests/tcg/mips/mips32-dsp/mthlip.c
index 9549aae..85f94d8 100644
--- a/tests/tcg/mips/mips32-dsp/mthlip.c
+++ b/tests/tcg/mips/mips32-dsp/mthlip.c
@@ -30,7 +30,7 @@  int main()
     assert(ach == resulth);
     assert(acl == resultl);
 
-    dsp = 0x3f;
+    dsp = 0x1f;
     ach = 0x05;
     acl = 0xB4CB;
     rs  = 0x00FFBBAA;