diff options
| author | Carlos O'Donell <carlos_odonell@mentor.com> | 2012-03-22 00:05:14 -0400 |
|---|---|---|
| committer | Carlos O'Donell <carlos_odonell@mentor.com> | 2012-03-22 00:05:14 -0400 |
| commit | 0e8a8f6d58000e8bc450ec484fe16a51c0b982c7 (patch) | |
| tree | f1e18519529f52571a7fa1b2e20c24dc9884b8ba | |
| parent | 925f8e84e6fd139478e6683e6ab84898571e4a98 (diff) | |
| download | glibc-0e8a8f6d58000e8bc450ec484fe16a51c0b982c7.tar.xz glibc-0e8a8f6d58000e8bc450ec484fe16a51c0b982c7.zip | |
[PARISC] small atomic.h optimization
We do not negate the light-weight syscall return and instead
just check for the negative errno value allowing the compiler
to optimize as required.
| -rw-r--r-- | ChangeLog.hppa | 7 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/hppa/bits/atomic.h | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 5271475442..700c78fe05 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2012-03-22 Carlos O'Donell <carlos@systemhalted.org> + + [BZ #6730] + + * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Don't negate %r21 and + check for -EFAULT and -ENOSYS instead. + 2012-03-09 Richard Henderson <rth@twiddle.net> * sysdeps/hppa/hppa1.1/s_signbit.c: Use <> to include math_private.h. diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h index 89823d279f..d94daf10a9 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h @@ -79,14 +79,13 @@ typedef uintmax_t uatomic_max_t; "cmpb,=,n %%r25, %%r21, 0b \n\t" \ "nop \n\t" \ "stw %%r28, %0 \n\t" \ - "sub %%r0, %%r21, %%r21 \n\t" \ "stw %%r21, %1 \n\t" \ : "=m" (lws_ret), "=m" (lws_errno) \ : "r" (mem), "r" (oldval), "r" (newval) \ : _LWS_CLOBBER \ ); \ \ - if(lws_errno == EFAULT || lws_errno == ENOSYS) \ + if(lws_errno == -EFAULT || lws_errno == -ENOSYS) \ ABORT_INSTRUCTION; \ \ lws_ret; \ |
