@@ -147,11 +147,29 @@ static void test_mips_mips16(void)
147
147
OK (uc_close (uc ));
148
148
}
149
149
150
+ static void test_mips_mips_fpr (void )
151
+ {
152
+ uc_engine * uc ;
153
+ uint64_t r_f1 ;
154
+ // ks.asm("li $t1, 0x42f6e979;mtc1 $t1, $f1")
155
+ const char code [] = "\xf6\x42\x09\x3c\x79\xe9\x29\x35\x00\x08\x89\x44" ;
156
+ uc_common_setup (& uc , UC_ARCH_MIPS , UC_MODE_MIPS32 , code , sizeof (code ) - 1 );
157
+
158
+ OK (uc_emu_start (uc , code_start , code_start + sizeof (code ) - 1 , 0 , 0 ));
159
+
160
+ OK (uc_reg_read (uc , UC_MIPS_REG_F1 , (void * )& r_f1 ));
161
+
162
+ TEST_CHECK (r_f1 = 0x42f6e979 );
163
+
164
+ OK (uc_close (uc ));
165
+ }
166
+
150
167
TEST_LIST = {
151
168
{"test_mips_stop_at_branch" , test_mips_stop_at_branch },
152
169
{"test_mips_stop_at_delay_slot" , test_mips_stop_at_delay_slot },
153
170
{"test_mips_el_ori" , test_mips_el_ori },
154
171
{"test_mips_eb_ori" , test_mips_eb_ori },
155
172
{"test_mips_lwx_exception_issue_1314" , test_mips_lwx_exception_issue_1314 },
156
173
{"test_mips_mips16" , test_mips_mips16 },
174
+ {"test_mips_mips_fpr" , test_mips_mips_fpr },
157
175
{NULL , NULL }};
0 commit comments