Author Topic: Saving FPU onto stack frame. Is it good?  (Read 6243 times)

Offline stressful

  • Full Member
  • **
  • Posts: 105
  • Country: 00
    • CPU2.0
Saving FPU onto stack frame. Is it good?
« on: December 19, 2014, 03:32:45 AM »
What if i have saved the FPU state on a local stack frame and restore it at later times after other function calls. Will my saved FPU environment be corrupted in-between?


Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Saving FPU onto stack frame. Is it good?
« Reply #1 on: December 19, 2014, 07:57:56 AM »
Should be good until the stack frame is destroyed - barring serious errors in the "other calls".

Best,
Frank


Offline stressful

  • Full Member
  • **
  • Posts: 105
  • Country: 00
    • CPU2.0
Re: Saving FPU onto stack frame. Is it good?
« Reply #2 on: December 19, 2014, 09:19:36 AM »
Should be good until the stack frame is destroyed - barring serious errors in the "other calls".

Best,
Frank
Thanks Frank. I guess making specialized functions to save and restore the FPU is a bad idea. Maybe I'll just use it internally in functions that use them or use static data area.