Andrew B. Lundgren wrote: > Is there a macro I can ifdef on to check to see if I can use the v8plus > instructions, otherwise use the existing spinlock implementation?
It looks like we have __sparc_v8__ and __sparc_v9__ but not a macro for v8plus. If you need one, you may have to add it. See CPP_CPU_SPEC in gcc/config/sparc/sparc.h. Since v8plus is really an ABI not a cpu, it might make sense to create a CPP_ABI_SPEC or similar. FYI You can use the cpp -dM option to see what predefined macros are available. Try it with -mv8, -mv8plus, -mv9 to see what the differences are. If you have access to the Sun compiler, you might want to check to see what Sun does. They may already have predefined preprocessor macros for this. -- Jim Wilson, GNU Tools Support, http://www.specifix.com