gustav_a
November 8th, 2005, 09:05 AM
Hi
I am working on a C++ program that generates random machinecode instructions that is stored in an byte-array and then directly executed. The instructions are all FPU-instructions (Floating Point Unit), for example, fadd, fsub, fmul, etc. When the instructions have been executed I read the top value from the FPU-stack, this is my "output".
The problem is that since the instructions are created randomly they often result in illegal values, overflow, NANs, etc. I have masked all the exeptions in the FPU control word but these instructions still take a _very_ long time to handle.
So what I'm asking is if there is a way to tell the processor that it should completely ignore any illegal values in the FPU and just continue with the execution?
/Gustav
I am working on a C++ program that generates random machinecode instructions that is stored in an byte-array and then directly executed. The instructions are all FPU-instructions (Floating Point Unit), for example, fadd, fsub, fmul, etc. When the instructions have been executed I read the top value from the FPU-stack, this is my "output".
The problem is that since the instructions are created randomly they often result in illegal values, overflow, NANs, etc. I have masked all the exeptions in the FPU control word but these instructions still take a _very_ long time to handle.
So what I'm asking is if there is a way to tell the processor that it should completely ignore any illegal values in the FPU and just continue with the execution?
/Gustav