blob: 39b858184349e242455e6940491493dfe66bd5d7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
fpu_do_push() function problem
Such as title.
function fpu_do_push(emu)
```
static inline void fpu_do_push(x64emu_t* emu)
{
int newtop = (emu->top-1)&7;
/*if(emu->p_regs[newtop].tag!=0b11) {// not empty, overflow!
printf_log(LOG_NONE, "Warning: %p: FPU Stack overflow\n", (void*)emu->old_ip); // probably better to raise something
//emu->quit = 1;
return;
}*/
if(emu->fpu_stack<8)
++emu->fpu_stack;
emu->p_regs[newtop].tag = 0; // full
emu->top = newtop;
}
```
However, the Intel manual describes when operating the FPU stack.
Set FPU flags C1 to 1 if stack overflow occurred; otherwise, set to 0.
So, Did you forget to set flags here? Should I add this operation?
|