I think my brain hurts.
Download the Motorola 68040 manual and read it, it's not hard to find. The 68040's *FPU* doesn't support some instructions that the 68881/2 do (section nine) and when it encounters those instructions it suspends execution and calls a handler which emulates the missing instructions (section eight). That's it. The code for doing that is in ROM on any 68040 Mac, presumably it's either in the driver software or ROM for any 68040 upgrade, and it's "mostly transparent" to the OS.
There is also one other small category of programs that blow up on the 68040 that work on the 68030, and it involves some really esoteric issues with cache handling and self-modifying code. (Technically self-modifying code was a bad idea ever since the 68020 but you could still mostly get away with it. It blew up on the 68040 because it has split instruction and data caches, which would cause a write to a block of code that happened to already be in the instruction cache not to show up unless it was flushed and re-populated from main RAM.) The only way to fix programs that have this issue is to rewrite (IE, RESTRUCTURE) the code in question. I'm really confused what your plan is here. Are you intending to do a global search and replace on a disk image hoping that swapping every binary occurrence of "&FEED" with "&BEEF" will do it, or what?