I now have assembler code which seems to work on sparc-v9/linux systems for the
atomic operations. It is basically David Miller's sparc 64 linux kernel code repackaged
to live in a little file (IceAtomic.c) in the <src/IceUtil> directory. It should work on
sparc-v9/solaris systems, but I don't have a solaris Ice port to try it with.
It is available in "Patches > SPARC mutex assembler: patches & new code" and
attached to this. (If I had realized I could attach a file outside the Patch threads,
I would not have put it there. It really should just be here because it is for comment;
it is not for general use. Appolgies for denseness.)
The patch file changes:
config/Make.rules <<< New flags and rules to enable sparc assembler
include/IceUtil/Shared.h <<< Defines for sparc assembler
src/IceUtil/Makefile <<< Compile IceAtomic.c if the environment is right.
src/IceUtil/IceAtomic.c <<< New file >>> Inplement __atomic_add, etc
src/icecpp/config.h <<< (allow sparc architecture)
This will NOT work on sparc-v8 (SS20) or earlier because it uses instructions which do
not exist prior to sparc version 9.
With this enabled, Ice for me passes all tests except for my random Glacier/starter
timeout, but I don't have a proof of correctness for the code, nor do I have an extensive
stress test. For reference, the system on which it works describes itself with
uname -srvmpio as:
Linux 2.4.20-sparc-r0 #3 SMP Fri Jan 3 15:56:09 UTC 2003 sparc64 sun4u TI UltraSparc II (BlackBird) GNU/Linux
I am submitting this as an example or strawman only, and note again that the code
is owned by the linux kernel, and it carries David S. Miller's copyright.

Reply With Quote