문제

I cannot understand this things: what is the use of such commands (FFREE, FDECSTP)? Can it ve used to pop value out of the fpu stack, or this is for some another purpose? I dont get it :/ Could someone explain that, tnx

도움이 되었습니까?

해결책

Yes, using FFREE, FINCSTP and FDECSTP you can manage the FPU stack manually. Note that FPU stack grows down similar to the CPU stack, so to remove (pop) something you mark the register as free and increment the stack pointer.

You won't see these instructions in typical code, especially since they can only operate one register at a time. In case of CPU stack using ADD ESP, x you can discard multiple items in one go, you can't do that with the FPU stack. As such, typically you use FSTP st(0) to discard one item, instead of the equivalent FFREE + FINCSTP pair. When allocating an item, you normally want to initialize too, so use some FLD variant.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top