aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/s390
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-01-08 00:22:00 +0000
committerUlrich Drepper <drepper@redhat.com>2003-01-08 00:22:00 +0000
commitb5facfdac0a9a10f9b0b145d6e3b1348a751f2ff (patch)
treeba1c715765882bf6dad329e73ee45d99c152422e /sysdeps/s390
parente9c7764ec9fe328dfac0c01a7f609d6a2a9bac00 (diff)
downloadglibc-b5facfdac0a9a10f9b0b145d6e3b1348a751f2ff.tar
glibc-b5facfdac0a9a10f9b0b145d6e3b1348a751f2ff.tar.gz
glibc-b5facfdac0a9a10f9b0b145d6e3b1348a751f2ff.tar.bz2
glibc-b5facfdac0a9a10f9b0b145d6e3b1348a751f2ff.zip
Update.
2003-01-06 Philip Blundell <philb@gnu.org> * sysdeps/unix/arm/sysdep.S (syscall_error): Optimise a little. [__LIBC_REENTRANT]: Unify PIC and non-PIC cases. * sysdeps/unix/sysv/linux/arm/sysdep.h (PSEUDO): Remove .type directive. (PSEUDO_RET): Use SYSCALL_ERROR in place of __syscall_error. (SYSCALL_ERROR): New. (SYSCALL_ERROR_HANDLER) [NOT_IN_libc]: Provide local copy of error handling code. (INTERNAL_SYSCALL): Define. (INLINE_SYSCALL): Use it. (INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): Define. * sysdeps/unix/sysv/linux/arm/socket.S (__socket): Use SYSCALL_ERROR in place of __syscall_error. 2003-01-07 Jakub Jelinek <jakub@redhat.com> * sysdeps/ia64/bits/byteswap.h [__GNUC__ >= 2] (__bswap_16, __bswap_32, __bswap_64): Put x into temporary variable to avoid warnings. [!__GNUC__] (__bswap_16, __bswap_32, __bswap_64): Change into static (inline) functions. * sysdeps/s390/bits/byteswap.h [__GNUC__ >= 2] (__bswap_16, __bswap_32, __bswap_64): Put x into temporary variable to avoid warnings. [!__GNUC__] (__bswap_16, __bswap_32, __bswap_64): Change into static (inline) functions. * sysdeps/i386/bits/byteswap.h [!__GNUC__] (__bswap_16, __bswap_32): Likewise. 2003-01-07 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/alpha/adjtime.c (ntp_adjtime): New weak alias.
Diffstat (limited to 'sysdeps/s390')
-rw-r--r--sysdeps/s390/bits/byteswap.h50
1 files changed, 31 insertions, 19 deletions
diff --git a/sysdeps/s390/bits/byteswap.h b/sysdeps/s390/bits/byteswap.h
index 6a4b4ae425..d0e31b8364 100644
--- a/sysdeps/s390/bits/byteswap.h
+++ b/sysdeps/s390/bits/byteswap.h
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values. s390 version.
- Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
@@ -35,11 +35,11 @@
# if __WORDSIZE == 64
# define __bswap_16(x) \
(__extension__ \
- ({ unsigned short int __v; \
+ ({ unsigned short int __v, __x = (x); \
if (__builtin_constant_p (x)) \
- __v = __bswap_constant_16 (x); \
+ __v = __bswap_constant_16 (__x); \
else { \
- unsigned short int __tmp = (unsigned short int) (x); \
+ unsigned short int __tmp = (unsigned short int) (__x); \
__asm__ __volatile__ ( \
"lrvh %0,%1" \
: "=&d" (__v) : "m" (__tmp) ); \
@@ -48,11 +48,11 @@
# else
# define __bswap_16(x) \
(__extension__ \
- ({ unsigned short int __v; \
+ ({ unsigned short int __v, __x = (x); \
if (__builtin_constant_p (x)) \
- __v = __bswap_constant_16 (x); \
+ __v = __bswap_constant_16 (__x); \
else { \
- unsigned short int __tmp = (unsigned short int) (x); \
+ unsigned short int __tmp = (unsigned short int) (__x); \
__asm__ __volatile__ ( \
"sr %0,%0\n" \
"la 1,%1\n" \
@@ -64,7 +64,11 @@
# endif
#else
/* This is better than nothing. */
-#define __bswap_16(x) __bswap_constant_16 (x)
+static __inline unsigned short int
+__bswap_16 (unsigned short int __bsx)
+{
+ return __bswap_constant_16 (__bsx);
+}
#endif
/* Swap bytes in 32 bit value. */
@@ -76,11 +80,11 @@
# if __WORDSIZE == 64
# define __bswap_32(x) \
(__extension__ \
- ({ unsigned int __v; \
+ ({ unsigned int __v, __x = (x); \
if (__builtin_constant_p (x)) \
- __v = __bswap_constant_32 (x); \
+ __v = __bswap_constant_32 (__x); \
else { \
- unsigned int __tmp = (unsigned int) (x); \
+ unsigned int __tmp = (unsigned int) (__x); \
__asm__ __volatile__ ( \
"lrv %0,%1" \
: "=&d" (__v) : "m" (__tmp)); \
@@ -89,11 +93,11 @@
# else
# define __bswap_32(x) \
(__extension__ \
- ({ unsigned int __v; \
+ ({ unsigned int __v, __x = (x); \
if (__builtin_constant_p (x)) \
- __v = __bswap_constant_32 (x); \
+ __v = __bswap_constant_32 (__x); \
else { \
- unsigned int __tmp = (unsigned int) (x); \
+ unsigned int __tmp = (unsigned int) (__x); \
__asm__ __volatile__ ( \
"la 1,%1\n" \
"icm %0,8,3(1)\n" \
@@ -105,7 +109,11 @@
__v; }))
# endif
#else
-# define __bswap_32(x) __bswap_constant_32 (x)
+static __inline unsigned int
+__bswap_32 (unsigned int __bsx)
+{
+ return __bswap_constant_32 (__bsx);
+}
#endif
/* Swap bytes in 64 bit value. */
@@ -119,11 +127,11 @@
# if __WORDSIZE == 64
# define __bswap_64(x) \
(__extension__ \
- ({ unsigned long __w; \
+ ({ unsigned long __w, __x = (x); \
if (__builtin_constant_p (x)) \
- __w = __bswap_constant_64 (x); \
+ __w = __bswap_constant_64 (__x); \
else { \
- unsigned long __tmp = (unsigned long) (x); \
+ unsigned long __tmp = (unsigned long) (__x); \
__asm__ __volatile__ ( \
"lrvg %0,%1" \
: "=&d" (__w) : "m" (__tmp)); \
@@ -140,7 +148,11 @@
__r.__ll; })
# endif
#else
-# define __bswap_64(x) __bswap_constant_64 (x)
+static __inline unsigned long long int
+__bswap_64 (unsigned long long int __bsx)
+{
+ return __bswap_constant_64 (__bsx);
+}
#endif
#endif /* _BITS_BYTESWAP_H */