Skip to content

Commit

Permalink
simx86: JIT now supports 64bit mem_base.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoldeman committed Jul 1, 2023
1 parent 407b9fd commit 7456c97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/dosext/dpmi/dnative/sigsegv.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ static void dosemu_fault1(int signum, sigcontext_t *scp, const siginfo_t *si)
goto bad;
}
#ifdef __x86_64__
if (_scp_trapno == 0x0e && _scp_cr2 > 0xffffffff)
if (_scp_trapno == 0x0e &&
((!_MAP_32BIT && _scp_cr2 < (uintptr_t)MEM_BASE32(0)) ||
_scp_cr2 > (_MAP_32BIT ? 0xffffffff : (uintptr_t)MEM_BASE32(0xffffffff))))
{
#ifdef X86_EMULATOR
if (IS_EMU_JIT() && e_in_compiled_code()) {
Expand Down
4 changes: 1 addition & 3 deletions src/include/mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@
#define MAPPING_NOOVERLAP 0x200000

#ifdef __x86_64__
/* FIXME: JIT should support 64bit mem_base */
#define _MAP_32BIT ((config.cpu_vm_dpmi == CPUVM_NATIVE || \
IS_EMU_JIT()) ? MAP_32BIT : 0)
#define _MAP_32BIT ((config.cpu_vm_dpmi == CPUVM_NATIVE) ? MAP_32BIT : 0)
#else
#define _MAP_32BIT 0
#endif
Expand Down

0 comments on commit 7456c97

Please sign in to comment.