summaryrefslogtreecommitdiffstats
path: root/qemu/tests/tcg/mips/mips64-dsp/subu_ob.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu/tests/tcg/mips/mips64-dsp/subu_ob.c')
-rw-r--r--qemu/tests/tcg/mips/mips64-dsp/subu_ob.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/qemu/tests/tcg/mips/mips64-dsp/subu_ob.c b/qemu/tests/tcg/mips/mips64-dsp/subu_ob.c
new file mode 100644
index 000000000..f67096711
--- /dev/null
+++ b/qemu/tests/tcg/mips/mips64-dsp/subu_ob.c
@@ -0,0 +1,26 @@
+#include "io.h"
+
+int main(void)
+{
+ long long rd, rs, rt, result, dspreg, dspresult;
+ rs = 0x6F6F6F6F6F6F6F6F;
+ rt = 0x5E5E5E5E5E5E5E5E;
+ result = 0x1111111111111111;
+ dspresult = 0x0;
+
+ __asm
+ ("subu.ob %0, %2, %3\n\t"
+ "rddsp %1\n\t"
+ : "=r"(rd), "=r"(dspreg)
+ : "r"(rs), "r"(rt)
+ );
+
+ if ((rd != result) || (dspreg != dspresult)) {
+ printf("subu.ob error\n");
+
+ return -1;
+ }
+
+ return 0;
+}
+