Skip to content

Commit

Permalink
Fixed a typo in x87 stack restauration
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed May 22, 2024
1 parent 69f0c97 commit 96a34a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/emu/x87emu_private.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ void fpu_fxrstor(x86emu_t* emu, void* ed)
int top = emu->top&7;
int stack = 8-top;
if(top==0) // check if stack is full or empty, based on tag[0]
stack = (emu->fpu_tags)?8:0;
stack = (emu->fpu_tags)?0:8;
for(int i=0; i<8; ++i)
memcpy((i<stack)?&ST(i):&emu->mmx[i], &p->FloatRegisters[i].q[0], sizeof(mmx87_regs_t));
// copy SSE regs
Expand Down

0 comments on commit 96a34a2

Please sign in to comment.