@@ -17,8 +17,8 @@ static void test_mips_el_ori(void)
17
17
char code [] = "\x56\x34\x21\x34" ; // ori $at, $at, 0x3456;
18
18
int r_r1 = 0x6789 ;
19
19
20
- uc_common_setup (& uc , UC_ARCH_MIPS , UC_MODE_MIPS32 | UC_MODE_LITTLE_ENDIAN , code ,
21
- sizeof (code ) - 1 );
20
+ uc_common_setup (& uc , UC_ARCH_MIPS , UC_MODE_MIPS32 | UC_MODE_LITTLE_ENDIAN ,
21
+ code , sizeof (code ) - 1 );
22
22
OK (uc_reg_write (uc , UC_MIPS_REG_1 , & r_r1 ));
23
23
24
24
OK (uc_emu_start (uc , code_start , code_start + sizeof (code ) - 1 , 0 , 0 ));
@@ -36,8 +36,8 @@ static void test_mips_eb_ori(void)
36
36
char code [] = "\x34\x21\x34\x56" ; // ori $at, $at, 0x3456;
37
37
int r_r1 = 0x6789 ;
38
38
39
- uc_common_setup (& uc , UC_ARCH_MIPS , UC_MODE_MIPS32 | UC_MODE_BIG_ENDIAN , code ,
40
- sizeof (code ) - 1 );
39
+ uc_common_setup (& uc , UC_ARCH_MIPS , UC_MODE_MIPS32 | UC_MODE_BIG_ENDIAN ,
40
+ code , sizeof (code ) - 1 );
41
41
OK (uc_reg_write (uc , UC_MIPS_REG_1 , & r_r1 ));
42
42
43
43
OK (uc_emu_start (uc , code_start , code_start + sizeof (code ) - 1 , 0 , 0 ));
@@ -56,8 +56,8 @@ static void test_mips_stop_at_branch(void)
56
56
"\x02\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00" ; // j 0x8; nop;
57
57
int r_pc = 0x0 ;
58
58
59
- uc_common_setup (& uc , UC_ARCH_MIPS , UC_MODE_MIPS32 | UC_MODE_LITTLE_ENDIAN , code ,
60
- sizeof (code ) - 1 );
59
+ uc_common_setup (& uc , UC_ARCH_MIPS , UC_MODE_MIPS32 | UC_MODE_LITTLE_ENDIAN ,
60
+ code , sizeof (code ) - 1 );
61
61
62
62
// Execute one instruction with branch delay slot.
63
63
OK (uc_emu_start (uc , code_start , code_start + sizeof (code ) - 1 , 0 , 1 ));
@@ -78,8 +78,8 @@ static void test_mips_stop_at_delay_slot(void)
78
78
"\x02\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00" ; // j 0x8; nop;
79
79
int r_pc = 0x0 ;
80
80
81
- uc_common_setup (& uc , UC_ARCH_MIPS , UC_MODE_MIPS32 | UC_MODE_LITTLE_ENDIAN , code ,
82
- sizeof (code ) - 1 );
81
+ uc_common_setup (& uc , UC_ARCH_MIPS , UC_MODE_MIPS32 | UC_MODE_LITTLE_ENDIAN ,
82
+ code , sizeof (code ) - 1 );
83
83
84
84
// Stop at the delay slot by design.
85
85
OK (uc_emu_start (uc , code_start , code_start + 4 , 0 , 0 ));
@@ -99,8 +99,8 @@ static void test_mips_lwx_exception_issue_1314(void)
99
99
char code [] = "\x0a\xc8\x79\x7e" ; // lwx $t9, $t9($s3)
100
100
int reg ;
101
101
102
- uc_common_setup (& uc , UC_ARCH_MIPS , UC_MODE_MIPS32 | UC_MODE_LITTLE_ENDIAN , code ,
103
- sizeof (code ) - 1 );
102
+ uc_common_setup (& uc , UC_ARCH_MIPS , UC_MODE_MIPS32 | UC_MODE_LITTLE_ENDIAN ,
103
+ code , sizeof (code ) - 1 );
104
104
OK (uc_mem_map (uc , 0x10000 , 0x4000 , UC_PROT_ALL ));
105
105
106
106
// Enable DSP
@@ -133,11 +133,12 @@ static void test_mips_mips16(void)
133
133
int r_v0 = 0x6789 ;
134
134
int mips16_lowbit = 1 ;
135
135
136
- uc_common_setup (& uc , UC_ARCH_MIPS , UC_MODE_MIPS32 | UC_MODE_LITTLE_ENDIAN , code ,
137
- sizeof (code ) - 1 );
136
+ uc_common_setup (& uc , UC_ARCH_MIPS , UC_MODE_MIPS32 | UC_MODE_LITTLE_ENDIAN ,
137
+ code , sizeof (code ) - 1 );
138
138
OK (uc_reg_write (uc , UC_MIPS_REG_V0 , & r_v0 ));
139
139
140
- OK (uc_emu_start (uc , code_start | mips16_lowbit , code_start + sizeof (code ) - 1 , 0 , 0 ));
140
+ OK (uc_emu_start (uc , code_start | mips16_lowbit ,
141
+ code_start + sizeof (code ) - 1 , 0 , 0 ));
141
142
142
143
OK (uc_reg_read (uc , UC_MIPS_REG_V0 , & r_v0 ));
143
144
0 commit comments