Author: Johan Klockars (62.13.18.80)
Date: 06-09-2003 18:57
> The short answer: No. PowerPC isn't 100% compatible with 68k.
A more precise answer would be:
No. PowerPC is 100% incompatible with 68k.
They have just about nothing in common besides being made by Motorola.
> Coldfire is only partly compatible to 68k and also has some powerpc instruction if I 'm not mistaken.
It has a couple of new instructions. Mainly of the 'DSP kind', IIRC (multiply-accumulate, perhaps saturating adds and such).
> 'Only partly compatible means missing some instructions which were there on the 68k. But form this point of view a 68060 misses one or to instuctions too...
It's _much_ worse with the ColdFire. Not only does it completely lack a few very common instructions (DBcc, for example), it also does not support word (16 bit) operations in many cases where a normal 68k would.
I once did a quick count in some of my fVDI assembly code to see what percentage of the instructions the ColdFire would need to emulate. The result was about 20%-70%, depending on the specific code (likely resulting in a speed reduction, compared to ColdFire-friendly code, of at least 10 times (possibly much more))!
Of course, this one example (I only looked at three or four subroutines, but one of them would be used for every single VDI call) may or may not be representative.
It's unfortunate that TurboC/PureC have been used as much as they have, since that compiler always uses 16 bit integers (int) and thus is likely to generate significant amounts of instructions that need to be emulated on the ColdFire.
While Lattice C and gcc can also be used with 16 bit integers, I believe a lot of code compiled with those has not been configured that way.
(Code using 16 bit integers is slightly faster on a 68000 (not on '020 and up), which is the main reason why it's so common in ST software.)
> That's why you've got to implement a emulator for older software. And then you get to the point where one can say: "if you emulate anyway, why don't grab a cheap powerfull x86".
Exactly.
I wouldn't be surprised if Motorola never makes a ColdFire chip that is as fast as what a JIT compiling 680x0 'emulator' like ARAnyM can achieve on x86 hardware.
(Assuming that the same piece of code is run enough times that the JIT compilation overhead does not dominate.)
|