Several new devices have an FPU these days (VFP in this case), a coprocessor that can speed up floating point (fractioned numbers) calculations. Devices that have an FPU include devices based on the SC6410 processor like the Samsung Omnia II/Pro and Acer M900 and Snapdragon based devices like the Toshiba TG01 and HTC Leo. However, Windows Mobile right now does not come with support for it. NuShrike and myself decided to do something about this, and FPU Enabler is the result.
FPU Enabler is an application that patches coredll in-memory and replaces some of the FPU emulation routines with actual FPU routines, all applications will automatically make use of this.
Now, obviously there are a number of caveats with an application like this. First, the FPU code is not IEEE compliant. This means that in some edge cases calculation results are undefined, which may cause issues. Exceptions are not supported - so for example a divide by 0 will not raise an error, which may be problematic. If your device acts as the control board for a nuclear power plant, we would definitely advise against using this app.
Not nearly all instructions that can be speed-up by FPU use are supported (yet). They may be in the future. Actual real-world effects will depend heavily on the application used. You'd have to look hard to notice it, for most applications. This may change as (if) more instructions become supported. Some say Crayon Physics seems a bit snappier, though.
Because of the way this is patched in, you aren't actually reaching the full speed possible with hardware FPU. Also, devices not running in "ALLKMODE" already are patched to run this way. As we haven't really found a good way to patch context switching code yet, during FPU instructions interrupts are disabled and an extra jump into patch-code is required. Disabling interrupts requires KMODE, and thus we patch everything to run this way.
What we really need is for Microsoft, Samsung, Toshiba, HTC, etc to just simply enable FPU support in their kernel builds. That would solve pretty much all the issues, and be quite a bit faster even. We know CE6 supports it, and it is rumored WM7 will as well, but it would be great if they would put in support in new 6.5 builds
Instructions
Credits
Patcher notes
Known issues
Changelog 0.70
FPU Enabler is an application that patches coredll in-memory and replaces some of the FPU emulation routines with actual FPU routines, all applications will automatically make use of this.
Now, obviously there are a number of caveats with an application like this. First, the FPU code is not IEEE compliant. This means that in some edge cases calculation results are undefined, which may cause issues. Exceptions are not supported - so for example a divide by 0 will not raise an error, which may be problematic. If your device acts as the control board for a nuclear power plant, we would definitely advise against using this app.
Not nearly all instructions that can be speed-up by FPU use are supported (yet). They may be in the future. Actual real-world effects will depend heavily on the application used. You'd have to look hard to notice it, for most applications. This may change as (if) more instructions become supported. Some say Crayon Physics seems a bit snappier, though.
Because of the way this is patched in, you aren't actually reaching the full speed possible with hardware FPU. Also, devices not running in "ALLKMODE" already are patched to run this way. As we haven't really found a good way to patch context switching code yet, during FPU instructions interrupts are disabled and an extra jump into patch-code is required. Disabling interrupts requires KMODE, and thus we patch everything to run this way.
What we really need is for Microsoft, Samsung, Toshiba, HTC, etc to just simply enable FPU support in their kernel builds. That would solve pretty much all the issues, and be quite a bit faster even. We know CE6 supports it, and it is rumored WM7 will as well, but it would be great if they would put in support in new 6.5 builds
Instructions
- Unpack the zip file somewhere
- Copy the EXE and the DLL to \ on your device
- Run the EXE
- Click Patch button
- If the Patch app says so, close it and restart it, click Patch again.
- Wait until "Done!"
- Keep the EXE running. Closing the EXE will "unpatch" the FPU instructions again.
Credits
- Chainfire - Patcher code
- NuShrike - FPU code
- cmonex - Help with patch theory
- no2chem - Help with patch theory
- Samsung S3C6410:
- Samsung Omnia II - main test device
- Samsung Omnia Pro - untested
- Acer M900 - tested and works
- Acer F900 - untested
- Acer X960 - untested
- Qualcomm Snapdragon:
- Toshiba TG01 - quick test done by cmonex
- HTC Leo - untested
Patcher notes
- DirtyBench is not really (or "really not") a reliable benchmark and does not benchmark all functions - hence the name.
- Instructions are benchmarked and then selected for patching or not. S3C6410 users will likely see about 17 functions patched, and 13 functions unpatched (those are very simple functions). Most effect will be seen in MUL and DIV instructions.
- __eqs
- __ges
- __gts
- __les
- __lts
- __eqd
- __ged
- __gtd
- __led
- __ltd
- __adds
- __subs
- __muls
- __divs
- __addd
- __subd
- __muld
- __divd
- __itos
- __itod
- __utos
- __utod
- __stoi
- __stou
- __stod
- __dtoi
- __dtou
- __dtos
Known issues
- None at the moment
Changelog 0.70
- Seperate KMODE and COREDLL patches
- Use FPUEnabler.dll instead of op_fpu.dll
- Unpatch FPU calls on exit
- Fixleak on exit
- __eqs, __eqd, __ges, __ged, __gts, __gtd, __les, __led, __lts, __ltd, __utos, __utod, __stou, __dtou added
Attached Files
Edited by Chainfire, 04 October 2009 - 02:06 PM.






Sign In
Create Account



Back to top










