@@ -53,15 +53,15 @@ using namespace std;
53
53
54
54
static uint32_t str2addr (string& addr_str) {
55
55
try {
56
- return ( uint32_t ) stoul (addr_str, NULL , 0 );
56
+ return static_cast < uint32_t >( stoul (addr_str, NULL , 0 ) );
57
57
} catch (invalid_argument& exc) {
58
58
throw invalid_argument (string (" Cannot convert " ) + addr_str);
59
59
}
60
60
}
61
61
62
62
static uint32_t str2num (string& num_str) {
63
63
try {
64
- return ( uint32_t ) stol (num_str, NULL , 0 );
64
+ return static_cast < uint32_t >( stol (num_str, NULL , 0 ) );
65
65
} catch (invalid_argument& exc) {
66
66
throw invalid_argument (string (" Cannot convert " ) + num_str);
67
67
}
@@ -142,7 +142,7 @@ static uint32_t disasm_68k(uint32_t count, uint32_t address) {
142
142
cout << uppercase << hex << insn->address << " " ;
143
143
cout << setfill (' ' );
144
144
cout << setw (10 ) << left << insn->mnemonic << insn->op_str << endl;
145
- address = dis_addr;
145
+ address = static_cast < uint32_t >( dis_addr) ;
146
146
} else {
147
147
print_bin:
148
148
cout << uppercase << hex << address << " " ;
@@ -168,7 +168,7 @@ void exec_single_68k()
168
168
169
169
/* PPC r24 contains 68k PC advanced by two bytes
170
170
as part of instruction prefetching */
171
- cur_68k_pc = get_reg (string (" R24" )) - 2 ;
171
+ cur_68k_pc = static_cast < uint32_t >( get_reg (string (" R24" )) - 2 ) ;
172
172
173
173
/* PPC r29 contains base address of the emulator opcode table */
174
174
emu_table_virt = get_reg (string (" R29" )) & 0xFFF80000 ;
@@ -178,7 +178,7 @@ void exec_single_68k()
178
178
cur_instr_tab_entry = mmu_read_vmem<uint16_t >(NO_OPCODE, cur_68k_pc) * 8 + emu_table_virt;
179
179
180
180
/* grab the PPC PC too */
181
- ppc_pc = get_reg (string (" PC" ));
181
+ ppc_pc = static_cast < uint32_t >( get_reg (string (" PC" ) ));
182
182
183
183
// printf("cur_instr_tab_entry = %X\n", cur_instr_tab_entry);
184
184
@@ -187,7 +187,7 @@ void exec_single_68k()
187
187
one by one until the execution goes outside the opcode table. */
188
188
while (power_on && ppc_pc >= cur_instr_tab_entry && ppc_pc < cur_instr_tab_entry + 8 ) {
189
189
ppc_exec_single ();
190
- ppc_pc = get_reg (string (" PC" ));
190
+ ppc_pc = static_cast < uint32_t >( get_reg (string (" PC" ) ));
191
191
}
192
192
193
193
/* Getting here means we're outside the emualtor opcode table.
@@ -655,7 +655,7 @@ void DppcDebugger::enter_debugger() {
655
655
}
656
656
} else if (cmd == " next" || cmd == " ni" ) {
657
657
addr_str = " PC" ;
658
- addr = ( uint32_t ) get_reg (addr_str) + 4 ;
658
+ addr = static_cast < uint32_t >( get_reg (addr_str) + 4 ) ;
659
659
ppc_exec_until (addr);
660
660
} else if (cmd == " until" ) {
661
661
if (cmd_repeat) {
@@ -738,7 +738,7 @@ void DppcDebugger::enter_debugger() {
738
738
}
739
739
else {
740
740
addr_str = " R24" ;
741
- addr = get_reg (addr_str) - 2 ;
741
+ addr = static_cast < uint32_t >( get_reg (addr_str) - 2 ) ;
742
742
}
743
743
next_addr_68k = disasm_68k (1 , addr);
744
744
#endif
@@ -749,7 +749,7 @@ void DppcDebugger::enter_debugger() {
749
749
}
750
750
else {
751
751
addr_str = " PC" ;
752
- addr = ( uint32_t ) get_reg (addr_str);
752
+ addr = static_cast < uint32_t >( get_reg (addr_str) );
753
753
}
754
754
next_addr_ppc = disasm (1 , addr);
755
755
}
0 commit comments