I donβt know if itβs still applicable to the current WDK, but Walter Oney demotiziruets the use of floating point things in the drivers here .
The problem is worse than just finding the right library, Unfortunately. C compiler floating-point support assumes that it will work in an application environment in which you can initialize the coprocessor, install some exception handlers, and then blow it up. He also assumes that the operating system will take care of saving and restoring each thread coprocessor context as necessary with all thread context switches that occur from now on.
These assumptions usually do not apply to the driver. In addition, runtime library support for coprocessor exceptions cannot work because there is a whole bunch of missing infrastructure.
What you need to do is write your code so that you initialize the coprocessor every time you want to use it (don't forget KeSaveFloatingPointState and KeRestoreFloatingPointState). To set so that the coprocessor never throws an exception, too. Then you can simply define the __fltused character somewhere to satisfy the linker. (Usually, this symbol usually drags run-time support. You do not want support, because, as I said, this will not work in kernel mode.) You will undoubtedly need to build the language code for the initialization steps.
If you have a system thread that will perform all your math floating point, you can initialize a coprocesor once at the beginning of the thread. The system will save and restore your state as needed from then on.
Do not forget that you can only do floating points in IRQL <DISPATCH_LEVEL.
There, among other things, UNDERSTAND. If you are rusting on the coprocessor programming, I would advise to inform the management that it will require significant study. Then go to Martinique for a week or so (after the hurricane season, that is) to conduct research in the appropriate environment.
Seriously, if you are not familiar with FINIT and the other mathematical instruction coprocessor, this is probably not what you should including your driver.
On x86 systems, floating point and multimedia modules are not available in kernel mode unless specifically requested. Attempting to use them improperly may or may not cause a floating point error when IRQL is raised (which will lead to a system crash), but this can lead to silence of data corruption in random processes. Misuse can also lead to corruption in other processes; such problems are often debugging.