1.19. FLOATING-POINT UNIT
FSTP ST(1)has been executed: a value of 5.6 is now at the top of the FPU stack.
Figure 1.86:OllyDbg:FSTPhas been executed
We now see that theFSTP ST(1)instruction works as follows: it leaves what has been at the top of the
stack, but clearsST(1).
GCC 4.4.1
Listing 1.212: GCC 4.4.1
d_max proc near
b = qword ptr -10h
a = qword ptr -8
a_first_half = dword ptr 8
a_second_half = dword ptr 0Ch
b_first_half = dword ptr 10h
b_second_half = dword ptr 14h
push ebp
mov ebp, esp
sub esp, 10h
; put a and b to local stack:
mov eax, [ebp+a_first_half]
mov dword ptr [ebp+a], eax
mov eax, [ebp+a_second_half]
mov dword ptr [ebp+a+4], eax
mov eax, [ebp+b_first_half]