Skip to content

Commit

Permalink
Merge pull request cebix#72 from rakslice/x64_32_instruction_skip
Browse files Browse the repository at this point in the history
X64 32-bit address instruction skip
  • Loading branch information
kanjitalk755 authored Dec 2, 2020
2 parents b672573 + f198632 commit cadd335
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions BasiliskII/src/CrossPlatform/sigsegv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,15 @@ static bool ix86_skip_instruction(SIGSEGV_REGISTER_TYPE * regs)
transfer_size = SIZE_WORD;
}

#if defined(__x86_64__) || defined(_M_X64)
// Address size override
if (*eip == 0x67) {
// 32-bit address
eip++;
len++;
}
#endif

// REX prefix
#if defined(__x86_64__) || defined(_M_X64)
struct rex_t {
Expand Down
9 changes: 9 additions & 0 deletions SheepShaver/src/CrossPlatform/sigsegv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,15 @@ static bool ix86_skip_instruction(SIGSEGV_REGISTER_TYPE * regs)
transfer_size = SIZE_WORD;
}

#if defined(__x86_64__) || defined(_M_X64)
// Address size override
if (*eip == 0x67) {
// 32-bit address
eip++;
len++;
}
#endif

// REX prefix
#if defined(__x86_64__) || defined(_M_X64)
struct rex_t {
Expand Down

0 comments on commit cadd335

Please sign in to comment.