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

Re: [MiNT] MiNTLib for ColdFire : DONE !



Hi,

4 jun 2009 kl. 16.36 skrev Vincent Rivière:

Yes, we could do that if someone wants to add compatibility for ColdFire binaries on 680x0, but I don't think it is a good idea ;-)

I don't think it's such a bad idea - but it depends on the code. It's not suitable for time critical stuff, obviously.

> but the MAC
instructions screw things up.. Didier solved the latter by using an unused TRAP instruction.

Yes, the Line A and MAC instructions share the same opcodes, and it is untrappable. This is a big problem for the ColdFire OS. ColdFire programs should just avoir do use Line A, like any modern applications.

I've found that even "clean" apps calls the Line A to retrieve the variable list. It's probably unused though.

The point with using the TRAP approach is that it's easy to patch - just replace $A000 in the binary with the corresponding TRAP opcode.
It's easy to implement in the OS too.

> Is this something which could be added to the
kernel as well? It does make it slightly easier to write code for both systems, since I woudn't have to check which CPU I'm running on.

I really don't like the idea of making "compatible binaries", because it would be suboptimal on any system. Some kind of "fat binaries" like on MacOS could do the trick, but I really don't want to see that.

Well, we already have separate binaries for 68000/FPU/020+ etc. I don't think having another set of binaries matters.


-- PeP