Skip to content

Commit

Permalink
Small changes to alternate address handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Dec 9, 2023
1 parent d2f033e commit 2de4ce8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/emu/x86run.c
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ int Run(x86emu_t *emu, int step)
GET_ED_;
Push(emu, R_CS);
Push(emu, addr);
addr = ED->dword[0];
addr = (uintptr_t)getAlternate((void*)ED->dword[0]);
R_CS = (ED+1)->word[0];
goto fini; // in case there is a change of CS
}
Expand All @@ -1567,7 +1567,7 @@ int Run(x86emu_t *emu, int step)
goto fini;
} else {
GET_ED_;
addr = ED->dword[0];
addr = (uintptr_t)getAlternate((void*)ED->dword[0]);
R_CS = (ED+1)->word[0];
STEP2;
}
Expand Down
4 changes: 2 additions & 2 deletions src/emu/x86run64.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ uintptr_t Run64(x86emu_t *emu, int seg, uintptr_t addr)
} else {
Push16(emu, R_CS);
Push(emu, addr);
addr = ED->dword[0];
addr = (uintptr_t)getAlternate((void*)ED->dword[0]);
R_CS = (ED+1)->word[0];
}
break;
Expand All @@ -454,7 +454,7 @@ uintptr_t Run64(x86emu_t *emu, int seg, uintptr_t addr)
emu->error |= ERR_ILLEGAL;
return 0;
} else {
addr = ED->dword[0];
addr = (uintptr_t)getAlternate((void*)ED->dword[0]);
R_CS = (ED+1)->word[0];
}
break;
Expand Down

0 comments on commit 2de4ce8

Please sign in to comment.