Skip to content

Commit

Permalink
Merge pull request #144 from rakslice/emaculation_x64_32_instruction_…
Browse files Browse the repository at this point in the history
…skip

Add x86_64 32-bit address mode prefix to ix86_skip_instruction
  • Loading branch information
ianfixes authored Dec 3, 2020
2 parents af55889 + 66a3122 commit b0a8453
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 b0a8453

Please sign in to comment.