Home away from home
Joined: 2006/11/20 16:26 Last Login
: Today 19:46
From Norway
Group:
Registered Users
|
@gregthecanuck
I have no looked at data-sheet for that CPU, on what instructions are missing and what is not. It really depends on how many are missing and if they are normally used by the compiler or not.
FPU instructions, are compiled into ELF binary, there are no JMP's to patch, unless there is special math function that are in library, in that case there are two possibility, the math function was linked into the ELF file, when program was compiled, or is liked at run time .so files. Or the it uses a .library file.
So there is a MIX of things, 1. FPU instructions in the program. 2. FPU instructions included in .a files that was linked in, as part of the program. 3. FPU instructions that are liked in at runtime .so files. 4. FPU instructions in external .library files. (no linking)
You accidentally have to dis-compile the binary, replace FPU instructions and then recompile the binary.
Every time you emulate a instruction its not like replace-ing one instruction with another, normally need to replace one instruction with 4 or more instructions, this means that code size will change, all relative offsets will be wrong, has be corrected fore.
And naturally no matter what you do, always have to do 4 or more for 1, so it will be slower.
If you wont speed you need to recompile the programs for that specific CPU target.
|