On Wed, 10 Sep 2008, Xerxes Rånby wrote: > Greetings! > > Im working on a patch to make OpenJDK6 compile and run on m68k. > The missing piece for the implementation is a way to do a atomic cmpxchg from > userspace. If we invent a way of doing that then the missing gcc atomic > builtins: > > __sync_val_compare_and_swap_4 > __sync_lock_test_and_set_4 > __sync_add_and_fetch_4 > > can be implemented using cmpxchg, this have already been done on the ARM port > using a exisiting kernelhelper for cmpxchg. > > I have noticed that there is ongoing work of creating a > __kernel_atomic_cmpxchg_32 helper for m68k using vDSO: > http://lists.debian.org/debian-68k/2007/12/msg00001.html > Someone know the status of this implementation? Is there any kernel patches > ready?
Freescale is working on the kernel patches. We are working on the toolchain patches at CodeSourcery (binutils done, GCC mostly done, glibc in progress - but testing may well show up bugs in any of the components). The specification does not include providing the atomic builtins - however, they could readily be provided in libc given the rest of the work. (Providing in libgcc, as done for SH and HPPA and proposed for ARM, would be hard when using a vDSO.) If you are concerned with classic m68k rather than ColdFire, you can of course use cas instructions; you just need to add the insn patterns to the compiler to generate appropriate code for the builtins. This is not part of the work we are planning to do. -- Joseph S. Myers [EMAIL PROTECTED]