[fpc-devel] M68k: important milestone reached

Karoly Balogh (Charlie/SGR) charlie at scenergy.dfmk.hu
Mon Feb 24 18:06:11 CET 2014


On Mon, 24 Feb 2014, Sven Barth wrote:

> Am 24.02.2014 17:29, schrieb Michael Schnell:
> > On 02/24/2014 03:41 PM, Sven Barth wrote:
> > >  are normally OS independant as they normally use corresponding CPU
> > > instructions.
> > Of course for simple stuff like inc/dec I can (better) use atomic 68 K
> > instruction :-) .
> Of course. But e.g. not every Coldfire architecture supports them. For this
> reason I introduced the cpuflags CPUM86K_HAS_TAS and CPUM68K_HAS_CAS which are
> set if the test-and-set and the compare-and-swap instructions are available
> respectively (68000 only has the TAS, but not the CAS, 68020 and 68040 have
> CAS and TAS while Coldfire ISA-A and ISA-A+ have neither and ISA-B and ISA-C
> only have TAS). When I find the time I will implement the Interlocked*
> functions accordingly :)

Keep in mind that at least TAS is (basically) forbidden on Amiga, because
it's incompatible with several HW implementations by Commodore and by how
DMA accesses are generated by various bus extensions (Zorro II) or custom
chips (eg. Agnus) in respect to the CPU and/or CPU expansion cards.

The same applies to CAS/CAS2, I guess. Basically anything which tries to
do an atomic read-write cycle is not guaranteed to work correctly on

More info:

So if you decide to implement anything related to this, better make it
OS specific too. :) Thank you.


More information about the fpc-devel mailing list