[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] MiNTLib for ColdFire : DONE !



Peter Persson wrote:
IIRC the Multiply and Accumulate (MAC) instructions use the 0xAxxx opcode range.

Yes, this is true.
But currently, GCC does generate MAC instructions, so the ColdFire executables will not be incompatible because of that.

> Apart from that, ColdFire binaries should run, shouldn't they?

No. The ColdFire lacks a lot of the 680x0 instructions and address modes, but it also adds a few new instructions. See at the bottom of this page:
http://www.microapl.co.uk/Porting/ColdFire/cf_68k_diffs.html

For example, there is no add.b and add.w on ColdFire. The data must be fetched into a register, then add.l can be used. The new mvs and mvz instructions can be used to fetch a byte or a word, then fill the remaining part of the target register to be suitable for add.l.

Some examples here (in French):
http://coldfire.zewan.com/68k_cf.htm

GCC uses a lot these new instructions, as well as 68020 instructions compatible with ColdFire, so without a CPU check ColdFire binaries crashes on 68000 and 68020.

--
Vincent Rivière