diff options
Diffstat (limited to 'libpthread/linuxthreads/sysdeps/m68k/pt-machine.h')
-rw-r--r-- | libpthread/linuxthreads/sysdeps/m68k/pt-machine.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h b/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h index a13c06946..3be216524 100644 --- a/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h +++ b/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h @@ -16,8 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; see the file COPYING.LIB. If - not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + not, see <http://www.gnu.org/licenses/>. */ #ifndef _PT_MACHINE_H #define _PT_MACHINE_H 1 @@ -34,8 +33,13 @@ testandset (int *spinlock) { char ret; - __asm__ __volatile__("tas %1; sne %0" - : "=dm"(ret), "=m"(*spinlock) + __asm__ __volatile__( +#if !defined(__mcoldfire__) && !defined(__mcf5200__) && !defined(__m68000) + "tas %1; sne %0" +#else + "bset #7,%1; sne %0" +#endif + : "=&dm"(ret), "=m"(*spinlock) : "m"(*spinlock) : "cc"); @@ -51,6 +55,7 @@ register char * stack_pointer __asm__ ("%sp"); /* Compare-and-swap for semaphores. */ +#if !defined(__mcoldfire__) && !defined(__mcf5200__) && !defined(__mc68000) #define HAS_COMPARE_AND_SWAP PT_EI int __compare_and_swap (long int *p, long int oldval, long int newval) @@ -64,5 +69,6 @@ __compare_and_swap (long int *p, long int oldval, long int newval) return ret; } +#endif #endif /* pt-machine.h */ |