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

Re: [MiNT] FreeMiNT for ColdFire: Generic



Andreas Schwab wrote:
So when you use an RTE instruction, you have to know what is the
actual CPU.

Actually, you don't.  It behaves the same everywhere: pop an exception
frame and return to the interrupted instruction.

You are right. It was intended to be a simple example, but it was inappropriate. For example, interrupt handlers routines are exactly the same regardless to the processor. As far as it is the same processor that calls the interrupt handler and handles the RTE instruction, it works symmetrically.

Those stack frame differences are only annoying inside TRAP handlers when the parameters have been pushed on the stack (XBIOS/BIOS/GEMDOS), they have to be fetched from different offsets according to the CPU.

There are also issues with instructions like MOVEC and CPUSHL which are different among processors.

Anyway, most of those instructions are used only at very specific places in the operating systems, so it may not be a big issue to fix them.

--
Vincent Rivière