summary refs log tree commit diff stats
path: root/tests/tcg/mips/user/ase/dsp/test_dsp_r2_append.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/user/ase/dsp/test_dsp_r2_append.c
parentb304981f52d2dd4ef4322fa90d1732611e9c5c45 (diff)
downloadfocaccia-qemu-073d9f2ce051d7a4bad9aa7bfdacf97394c57c05.tar.gz
focaccia-qemu-073d9f2ce051d7a4bad9aa7bfdacf97394c57c05.zip
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/user/ase/dsp/test_dsp_r2_append.c')
-rw-r--r--tests/tcg/mips/user/ase/dsp/test_dsp_r2_append.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/tcg/mips/user/ase/dsp/test_dsp_r2_append.c b/tests/tcg/mips/user/ase/dsp/test_dsp_r2_append.c
new file mode 100644
index 0000000000..9a91e1650d
--- /dev/null
+++ b/tests/tcg/mips/user/ase/dsp/test_dsp_r2_append.c
@@ -0,0 +1,30 @@
+#include<stdio.h>
+#include<assert.h>
+
+int main()
+{
+    int rs, rt;
+    int result;
+
+    rs     = 0xFF0055AA;
+    rt     = 0x0113421B;
+    result = 0x02268436;
+    __asm
+        ("append %0, %1, 0x01\n\t"
+         : "+r"(rt)
+         : "r"(rs)
+        );
+    assert(rt == result);
+
+    rs     = 0xFFFF0FFF;
+    rt     = 0x00010111;
+    result = 0x0010111F;
+    __asm
+        ("append %0, %1, 0x04\n\t"
+         : "+r"(rt)
+         : "r"(rs)
+        );
+    assert(rt == result);
+
+    return 0;
+}