Have a look in FreeBSD /sys/gnu/i386/fpemul . It is from It's from Linux, actually. What might be interesting is to make this code modload'able. I *strongly* encourage people to *not* do this. If there is a readily available GPLed emulator, there is little incentive for anyone to write a non-GPLed one.