Skip to content

Commit b0a8453

Browse files
authored
Merge pull request #144 from rakslice/emaculation_x64_32_instruction_skip
Add x86_64 32-bit address mode prefix to ix86_skip_instruction
2 parents af55889 + 66a3122 commit b0a8453

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

BasiliskII/src/CrossPlatform/sigsegv.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -1018,6 +1018,15 @@ static bool ix86_skip_instruction(SIGSEGV_REGISTER_TYPE * regs)
10181018
transfer_size = SIZE_WORD;
10191019
}
10201020

1021+
#if defined(__x86_64__) || defined(_M_X64)
1022+
// Address size override
1023+
if (*eip == 0x67) {
1024+
// 32-bit address
1025+
eip++;
1026+
len++;
1027+
}
1028+
#endif
1029+
10211030
// REX prefix
10221031
#if defined(__x86_64__) || defined(_M_X64)
10231032
struct rex_t {

SheepShaver/src/CrossPlatform/sigsegv.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -1018,6 +1018,15 @@ static bool ix86_skip_instruction(SIGSEGV_REGISTER_TYPE * regs)
10181018
transfer_size = SIZE_WORD;
10191019
}
10201020

1021+
#if defined(__x86_64__) || defined(_M_X64)
1022+
// Address size override
1023+
if (*eip == 0x67) {
1024+
// 32-bit address
1025+
eip++;
1026+
len++;
1027+
}
1028+
#endif
1029+
10211030
// REX prefix
10221031
#if defined(__x86_64__) || defined(_M_X64)
10231032
struct rex_t {

0 commit comments

Comments
 (0)