aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg/mips/mips32-dspr2/dps_w_ph.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tcg/mips/mips32-dspr2/dps_w_ph.c')
-rw-r--r--tests/tcg/mips/mips32-dspr2/dps_w_ph.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/tcg/mips/mips32-dspr2/dps_w_ph.c b/tests/tcg/mips/mips32-dspr2/dps_w_ph.c
index 8303643d18..f51f9b9d13 100644
--- a/tests/tcg/mips/mips32-dspr2/dps_w_ph.c
+++ b/tests/tcg/mips/mips32-dspr2/dps_w_ph.c
@@ -23,5 +23,22 @@ int main()
assert(ach == resulth);
assert(acl == resultl);
+ ach = 6, acl = 7;
+ rs = 0xFFFF00FF;
+ rt = 0xFFFF0002;
+ resulth = 0x05;
+ resultl = 0xFFFFFE08;
+ __asm
+ ("mthi %0, $ac1\n\t"
+ "mtlo %1, $ac1\n\t"
+ "dps.w.ph $ac1, %2, %3\n\t"
+ "mfhi %0, $ac1\n\t"
+ "mflo %1, $ac1\n\t"
+ : "+r"(ach), "+r"(acl)
+ : "r"(rs), "r"(rt)
+ );
+ assert(ach == resulth);
+ assert(acl == resultl);
+
return 0;
}