diff options
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h b/nptl/sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h index 3a80ec8e14..76d22c88f9 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h +++ b/nptl/sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #define _IMP1 #1 #define _IMM1 #-1 +#define _IMM4 #-4 #define _IMM6 #-6 #define _IMM8 #-8 @@ -53,6 +54,16 @@ mov.l reg, mem; \ 99: mov r1, r15 +#define XCHG(reg, mem, old) \ + .align 2; \ + mova 99f, r0; \ + nop; \ + mov r15, r1; \ + mov _IMM4, r15; \ +98: mov.l mem, old; \ + mov.l reg, mem; \ +99: mov r1, r15 + #define CMPXCHG(reg, mem, new, old) \ .align 2; \ mova 99f, r0; \ |