Skip to content

Commit 7f47ea5

Browse files
committed
simx86: fix JIT regression from 117d39c
Ofs_EBX was used instead of Ofs_KEY for A_SR_PROT, where the comment was correct. Elsewhere a comment was wrong but the code ok. Fixes dosemu2#2710
1 parent 3cc7d23 commit 7f47ea5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/base/emu-i386/simx86/codegen-x86.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ static unsigned char *CodeGen_x86(unsigned char *CodePtr, unsigned char *BaseGen
278278
// jz skip
279279
G2M(JE_JZ,TAILSIZE,Cp);
280280
// movl {exit_addr},%%eax; movl %%eax, %%Ofs_KEY(%%ebx)
281-
G1(0xb8,Cp); G4(IG->p1,Cp); G3M(0x89,0x43,Ofs_EBX,Cp);
281+
G1(0xb8,Cp); G4(IG->p1,Cp); G3M(0x89,0x43,Ofs_KEY,Cp);
282282
// pop %%edx; ret
283283
G2M(0x5a,0xc3,Cp);
284284
}
@@ -1880,7 +1880,7 @@ arith0: {
18801880
G3M(0x0f,0xb7,0xc0,Cp);
18811881
// addl Ofs_XCS(%%ebx),%%eax
18821882
G3M(0x03,0x43,Ofs_XCS,Cp);
1883-
// movl %%eax, Ofs_KEY(%%ecx) // signals indirect
1883+
// movl %%eax, Ofs_KEY(%%ebx) // signals indirect
18841884
G3M(0x89,0x43,Ofs_KEY,Cp);
18851885
#ifdef __x86_64__
18861886
// movl %%eax,%%edi

0 commit comments

Comments
 (0)