Skip to content

Commit e2ad753

Browse files
committed
More clean-up
1 parent 2ab2354 commit e2ad753

File tree

5 files changed

+19
-2
lines changed

5 files changed

+19
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ CMakeSettings.json
2020
*.vcxproj
2121
*.vcxproj.filters
2222

23+
# Ignore Visual Studio auto-save recovery folder
24+
enc_temp_folder/
25+
2326
# Ignore CodeLite configuration files
2427
*.workspace
2528
*.workspace.*

cpu/ppc/ppcfpopcodes.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ inline static void snan_double_check(int reg_a, int reg_b) {
103103
ppc_state.fpscr |= FX | VX | VXSNAN;
104104
}
105105

106+
inline static void max_double_check(double value_a, double value_b) {
107+
if (((value_a == DBL_MAX) && (value_b == DBL_MAX)) ||
108+
((value_a == -DBL_MAX) && (value_b == -DBL_MAX)))
109+
ppc_state.fpscr |= FX | OX | XX | FI;
110+
}
111+
106112
inline static bool check_qnan(int check_reg) {
107113
uint64_t check_int = ppc_state.fpr[check_reg].int64_r;
108114
return (((check_int & (0x7FFULL << 52)) == (0x7FFULL << 52)) &&
@@ -151,10 +157,12 @@ void dppc_interpreter::ppc_fadd() {
151157
ppc_grab_regsfpdab(ppc_cur_instruction);
152158

153159
snan_double_check(reg_a, reg_b);
160+
max_double_check(val_reg_a, val_reg_b);
154161

155162
double ppc_dblresult64_d = val_reg_a + val_reg_b;
156163
ppc_store_dfpresult_flt(reg_d, ppc_dblresult64_d);
157164
fpresult_update(ppc_dblresult64_d);
165+
ppc_update_fex();
158166

159167
if (rec)
160168
ppc_update_cr1();
@@ -170,6 +178,7 @@ void dppc_interpreter::ppc_fsub() {
170178
snan_double_check(reg_a, reg_b);
171179

172180
double ppc_dblresult64_d = val_reg_a - val_reg_b;
181+
173182
ppc_store_dfpresult_flt(reg_d, ppc_dblresult64_d);
174183
fpresult_update(ppc_dblresult64_d);
175184

@@ -311,6 +320,7 @@ void dppc_interpreter::ppc_fsubs() {
311320
snan_double_check(reg_a, reg_b);
312321

313322
double ppc_dblresult64_d = (float)(val_reg_a - val_reg_b);
323+
314324
ppc_store_sfpresult_flt(reg_d, ppc_dblresult64_d);
315325
fpresult_update(ppc_dblresult64_d);
316326

cpu/ppc/ppcopcodes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ template void dppc_interpreter::ppc_srawi<RC1>();
666666
/** mask generator for rotate and shift instructions (§ 4.2.1.4 PowerpC PEM) */
667667
static inline uint32_t rot_mask(unsigned rot_mb, unsigned rot_me) {
668668
uint32_t m1 = 0xFFFFFFFFUL >> rot_mb;
669-
uint32_t m2 = (uint32_t)(0xFFFFFFFFUL << (31 - rot_me));
669+
uint32_t m2 = uint32_t(0xFFFFFFFFUL << (31 - rot_me));
670670
return ((rot_mb <= rot_me) ? m2 & m1 : m1 | m2);
671671
}
672672

devices/common/scsi/scsibusctrl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ uint8_t ScsiBusController::fifo_pop() {
279279
if (this->fifo_pos) {
280280
data = this->data_fifo[0];
281281
if (--this->fifo_pos)
282-
std:memmove(this->data_fifo, &this->data_fifo[1], this->fifo_pos);
282+
std::memmove(this->data_fifo, &this->data_fifo[1], this->fifo_pos);
283283
}
284284

285285
// see if we need to refill FIFO

main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ void run_machine(std::string machine_str, std::string bootrom_path, uint32_t exe
253253
power_off_reason = po_starting_up;
254254
enter_debugger();
255255
break;
256+
case threaded_int:
257+
power_off_reason = po_starting_up;
258+
enter_debugger();
259+
break;
256260
case debugger:
257261
power_off_reason = po_enter_debugger;
258262
enter_debugger();

0 commit comments

Comments
 (0)