aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg/mips/mips32-dsp/mthlip.c
diff options
context:
space:
mode:
authorAleksandar Markovic <amarkovic@wavecomp.com>2019-01-22 16:53:00 +0100
committerAleksandar Markovic <amarkovic@wavecomp.com>2019-01-24 17:48:33 +0100
commit073d9f2ce051d7a4bad9aa7bfdacf97394c57c05 (patch)
treed7ebbc66d7a95c4e04f9b72d5233d363139390e6 /tests/tcg/mips/mips32-dsp/mthlip.c
parentb304981f52d2dd4ef4322fa90d1732611e9c5c45 (diff)
tests: tcg: mips: Move source files to new locations
MIPS TCG test will be organized by ISAs and ASEs in future. Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Diffstat (limited to 'tests/tcg/mips/mips32-dsp/mthlip.c')
-rw-r--r--tests/tcg/mips/mips32-dsp/mthlip.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/tests/tcg/mips/mips32-dsp/mthlip.c b/tests/tcg/mips/mips32-dsp/mthlip.c
deleted file mode 100644
index 85f94d8450..0000000000
--- a/tests/tcg/mips/mips32-dsp/mthlip.c
+++ /dev/null
@@ -1,58 +0,0 @@
-#include<stdio.h>
-#include<assert.h>
-
-int main()
-{
- int rs, ach, acl, dsp;
- int result, resulth, resultl;
-
- dsp = 0x07;
- ach = 0x05;
- acl = 0xB4CB;
- rs = 0x00FFBBAA;
- resulth = 0xB4CB;
- resultl = 0x00FFBBAA;
- result = 0x27;
-
- __asm
- ("wrdsp %0, 0x01\n\t"
- "mthi %1, $ac1\n\t"
- "mtlo %2, $ac1\n\t"
- "mthlip %3, $ac1\n\t"
- "mfhi %1, $ac1\n\t"
- "mflo %2, $ac1\n\t"
- "rddsp %0\n\t"
- : "+r"(dsp), "+r"(ach), "+r"(acl)
- : "r"(rs)
- );
- dsp = dsp & 0x3F;
- assert(dsp == result);
- assert(ach == resulth);
- assert(acl == resultl);
-
- dsp = 0x1f;
- ach = 0x05;
- acl = 0xB4CB;
- rs = 0x00FFBBAA;
- resulth = 0xB4CB;
- resultl = 0x00FFBBAA;
- result = 0x3f;
-
- __asm
- ("wrdsp %0, 0x01\n\t"
- "mthi %1, $ac1\n\t"
- "mtlo %2, $ac1\n\t"
- "mthlip %3, $ac1\n\t"
- "mfhi %1, $ac1\n\t"
- "mflo %2, $ac1\n\t"
- "rddsp %0\n\t"
- : "+r"(dsp), "+r"(ach), "+r"(acl)
- : "r"(rs)
- );
- dsp = dsp & 0x3F;
- assert(dsp == result);
- assert(ach == resulth);
- assert(acl == resultl);
-
- return 0;
-}