2 Replies Latest reply on Nov 18, 2014 11:34 AM by allan_intel

    FRSTOR Floating-Point Exceptions

    451

      I am writing an RTOS and I have some questions about Floating-Point Exceptions generated by the FRSTOR instruction.

      The Intel® 64 and IA-32 Architectures Software Developer’s Manual  Volume 2 says that the FRSTOR instruction "might unmask an existing exception that has been detected but not generated, because it was masked. Here, the exception is generated at the completion of the instruction." I have 2 questions related to this:

      1) What address will the EIP be when the exception occurs (the FRSTOR instruction or next instruction).

      2) How do I cause the exception to occur? I need to test the code I have written to handle this case. I have tried several different ways to get FRSTOR to generate an exception based on the restored data and no matter what I do the exception is not raised until the floating point instruction after the FRSTOR, that does not appear to match what is described in the manual.