From: Ulrich Drepper Date: Tue, 22 Jan 2008 18:22:07 +0000 (+0000) Subject: (XADD): Use a scratch register. X-Git-Tag: cvs/fedora-glibc-20080131T0821~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3c7e0ea69a68fdf0e51edef1911c32b4d7bfa674;p=platform%2Fupstream%2Fglibc.git (XADD): Use a scratch register. --- diff --git a/nptl/sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h b/nptl/sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h index 76d22c8..c702836 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, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2008 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 @@ -44,14 +44,16 @@ mov.l reg, mem; \ 99: mov r1, r15 -#define XADD(reg, mem, old) \ +#define XADD(reg, mem, old, tmp) \ .align 2; \ mova 99f, r0; \ + nop; \ mov r15, r1; \ - mov _IMM6, r15; \ + mov _IMM8, r15; \ 98: mov.l mem, old; \ - add old, reg; \ - mov.l reg, mem; \ + mov reg, tmp; \ + add old, tmp; \ + mov.l tmp, mem; \ 99: mov r1, r15 #define XCHG(reg, mem, old) \