Skip to content

Commit

Permalink
improve stability
Browse files Browse the repository at this point in the history
  • Loading branch information
kanjitalk755 committed Nov 27, 2017
1 parent 4fa3294 commit 42353c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions SheepShaver/src/CrossPlatform/sigsegv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2646,6 +2646,14 @@ static bool handle_badaccess(SIGSEGV_FAULT_HANDLER_ARGLIST_1)
x86_thread_state64_t *ts = &SIP->thr_state;
uint8_t *rip = (uint8_t *)ts->__rip;
switch (rip[0]) {
case 0xf:
if (rip[1] == 0xb7 && rip[2] == 0) {
ts->__rax = safeLoad<uint16_t>(ts->__rax);
ts->__rip += 3;
mach_set_thread_state(SIP);
return true;
}
break;
case 0x44:
if (rip[1] == 0xf && rip[2] == 0xb6 && rip[3] == 0x20) {
ts->__r12 = safeLoad<uint8_t>(ts->__rax);
Expand Down

0 comments on commit 42353c9

Please sign in to comment.