This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.10-322-gd840539
- From: drepper at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 1 Sep 2009 22:36:51 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.10-322-gd840539
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via d840539e1271020600edba752e6ee908c00f66eb (commit)
via a050d2a5e722876623a70d501c3cdfedfce8b5ce (commit)
via 5182cbc5ab6e2bc294e14dae22fb3a8553713a41 (commit)
via 240441038f2d2b1a32d4239270c7f76531a484f3 (commit)
from c2735e958acc6a69daab71fdc463564860f20794 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d840539e1271020600edba752e6ee908c00f66eb
commit d840539e1271020600edba752e6ee908c00f66eb
Author: Andreas Schwab <schwab@redhat.com>
Date: Tue Sep 1 15:36:22 2009 -0700
Cleanup _IO_wfile_seekoff.
This reformulates the in-buffer optimisation check to match the code in
_IO_new_file_seekoff. No functional changes, but easier to understand.
diff --git a/ChangeLog b/ChangeLog
index 4408a49..0812312 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-31 Andreas Schwab <schwab@redhat.com>
+
+ * libio/wfileops.c (_IO_wfile_seekoff): Remove dead code and
+ reformulate in-buffer optimisation check to match code in
+ _IO_new_file_seekoff.
+
2009-08-31 Joshua W. Boyer <jwboyer@linux.vnet.ibm.com>
* sysdeps/powerpc/powerpc32/power6/memcpy.S: Change srdi instruction
diff --git a/libio/wfileops.c b/libio/wfileops.c
index 57ed786..be8ae78 100644
--- a/libio/wfileops.c
+++ b/libio/wfileops.c
@@ -678,88 +678,56 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
if (fp->_offset != _IO_pos_BAD && fp->_IO_read_base != NULL
&& !_IO_in_backup (fp))
{
- /* Offset relative to start of main get area. */
- _IO_off64_t rel_offset = (offset - fp->_offset
- + (fp->_IO_read_end - fp->_IO_read_base));
- if (rel_offset >= 0)
+ _IO_off64_t start_offset = (fp->_offset
+ - (fp->_IO_read_end - fp->_IO_buf_base));
+ if (offset >= start_offset && offset < fp->_offset)
{
-#if 0
- if (_IO_in_backup (fp))
- _IO_switch_to_main_get_area (fp);
-#endif
- if (rel_offset <= fp->_IO_read_end - fp->_IO_read_base)
+ enum __codecvt_result status;
+ struct _IO_codecvt *cd = fp->_codecvt;
+ const char *read_ptr_copy;
+
+ _IO_setg (fp, fp->_IO_buf_base,
+ fp->_IO_buf_base + (offset - start_offset),
+ fp->_IO_read_end);
+ _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
+
+ /* Now set the pointer for the internal buffer. This
+ might be an iterative process. Though the read
+ pointer is somewhere in the current external buffer
+ this does not mean we can convert this whole buffer
+ at once fitting in the internal buffer. */
+ fp->_wide_data->_IO_state = fp->_wide_data->_IO_last_state;
+ read_ptr_copy = fp->_IO_read_base;
+ fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_base;
+ do
{
- enum __codecvt_result status;
- struct _IO_codecvt *cd = fp->_codecvt;
- const char *read_ptr_copy;
-
- fp->_IO_read_ptr = fp->_IO_read_base + rel_offset;
- _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
-
- /* Now set the pointer for the internal buffer. This
- might be an iterative process. Though the read
- pointer is somewhere in the current external buffer
- this does not mean we can convert this whole buffer
- at once fitting in the internal buffer. */
- fp->_wide_data->_IO_state = fp->_wide_data->_IO_last_state;
- read_ptr_copy = fp->_IO_read_base;
- fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_base;
- do
+ wchar_t buffer[1024];
+ wchar_t *ignore;
+ status = (*cd->__codecvt_do_in) (cd,
+ &fp->_wide_data->_IO_state,
+ read_ptr_copy,
+ fp->_IO_read_ptr,
+ &read_ptr_copy,
+ buffer,
+ buffer
+ + (sizeof (buffer)
+ / sizeof (buffer[0])),
+ &ignore);
+ if (status != __codecvt_ok && status != __codecvt_partial)
{
- wchar_t buffer[1024];
- wchar_t *ignore;
- status = (*cd->__codecvt_do_in) (cd,
- &fp->_wide_data->_IO_state,
- read_ptr_copy,
- fp->_IO_read_ptr,
- &read_ptr_copy,
- buffer,
- buffer
- + (sizeof (buffer)
- / sizeof (buffer[0])),
- &ignore);
- if (status != __codecvt_ok && status != __codecvt_partial)
- {
- fp->_flags |= _IO_ERR_SEEN;
- goto dumb;
- }
+ fp->_flags |= _IO_ERR_SEEN;
+ goto dumb;
}
- while (read_ptr_copy != fp->_IO_read_ptr);
+ }
+ while (read_ptr_copy != fp->_IO_read_ptr);
- fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_base;
+ fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_base;
- _IO_mask_flags (fp, 0, _IO_EOF_SEEN);
- goto resync;
- }
-#ifdef TODO
- /* If we have streammarkers, seek forward by reading ahead. */
- if (_IO_have_markers (fp))
- {
- int to_skip = rel_offset
- - (fp->_IO_read_ptr - fp->_IO_read_base);
- if (ignore (to_skip) != to_skip)
- goto dumb;
- _IO_mask_flags (fp, 0, _IO_EOF_SEEN);
- goto resync;
- }
-#endif
- }
-#ifdef TODO
- if (rel_offset < 0 && rel_offset >= Bbase () - Bptr ())
- {
- if (!_IO_in_backup (fp))
- _IO_switch_to_backup_area (fp);
- gbump (fp->_IO_read_end + rel_offset - fp->_IO_read_ptr);
_IO_mask_flags (fp, 0, _IO_EOF_SEEN);
goto resync;
}
-#endif
}
-#ifdef TODO
- INTUSE(_IO_unsave_markers) (fp);
-#endif
-
if (fp->_flags & _IO_NO_READS)
goto dumb;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a050d2a5e722876623a70d501c3cdfedfce8b5ce
commit a050d2a5e722876623a70d501c3cdfedfce8b5ce
Author: Joshua W. Boyer <jwboyer@linux.vnet.ibm.com>
Date: Tue Sep 1 15:35:35 2009 -0700
Fix use of 64-bit insn in 32-bit memcpy for POWER6.
diff --git a/ChangeLog b/ChangeLog
index 2f7f799..4408a49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-31 Joshua W. Boyer <jwboyer@linux.vnet.ibm.com>
+
+ * sysdeps/powerpc/powerpc32/power6/memcpy.S: Change srdi instruction
+ to srwi in 32-bit memcpy for power6.
+
2009-09-01 Andreas Schwab <schwab@redhat.com>
* include/stdio.h: Declare hidden proto for fflush.
diff --git a/sysdeps/powerpc/powerpc32/power6/memcpy.S b/sysdeps/powerpc/powerpc32/power6/memcpy.S
index 156b0bd..cafe917 100644
--- a/sysdeps/powerpc/powerpc32/power6/memcpy.S
+++ b/sysdeps/powerpc/powerpc32/power6/memcpy.S
@@ -220,7 +220,7 @@ L(word_unaligned_short):
subf 10,0,5
add 12,4,0
blt cr6,5f
- srdi 7,6,16
+ srwi 7,6,16
bgt cr6,3f
sth 6,0(3)
b 7f
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5182cbc5ab6e2bc294e14dae22fb3a8553713a41
commit 5182cbc5ab6e2bc294e14dae22fb3a8553713a41
Author: Andreas Schwab <schwab@redhat.com>
Date: Tue Sep 1 15:31:09 2009 -0700
Add hidden alias for fflush.
diff --git a/ChangeLog b/ChangeLog
index b4e6966..2f7f799 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,13 @@
+2009-09-01 Andreas Schwab <schwab@redhat.com>
+
+ * include/stdio.h: Declare hidden proto for fflush.
+ * libio/iofflush.c: Add hidden weak alias for fflush.
+
2009-09-01 Jakub Jelinek <jakub@redhat.com>
* sysdeps/x86_64/fpu/bits/mathinline.h: Include bits/wordsize.h.
(__signbitf, __signbit): Only use SSE inline asm for 64-bit.
-
+
2009-08-31 Andreas Schwab <schwab@redhat.com>
* sysdeps/x86_64/fpu/bits/mathinline.h: Use __asm instead of asm.
diff --git a/include/stdio.h b/include/stdio.h
index a8aab92..444aa39 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -148,6 +148,7 @@ libc_hidden_proto (fileno)
libc_hidden_proto (fwrite)
libc_hidden_proto (fseek)
libc_hidden_proto (ftello)
+libc_hidden_proto (fflush)
libc_hidden_proto (fflush_unlocked)
libc_hidden_proto (fread_unlocked)
libc_hidden_proto (fwrite_unlocked)
diff --git a/libio/iofflush.c b/libio/iofflush.c
index d2d57f5..3294276 100644
--- a/libio/iofflush.c
+++ b/libio/iofflush.c
@@ -49,6 +49,7 @@ INTDEF(_IO_fflush)
#ifdef weak_alias
weak_alias (_IO_fflush, fflush)
+libc_hidden_weak (fflush)
#ifndef _IO_MTSAFE_IO
weak_alias (_IO_fflush, fflush_unlocked)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=240441038f2d2b1a32d4239270c7f76531a484f3
commit 240441038f2d2b1a32d4239270c7f76531a484f3
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Sep 1 15:30:12 2009 -0700
Fix x86_64 bits/mathinline.h for -m32 compilation.
diff --git a/ChangeLog b/ChangeLog
index d230db7..b4e6966 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-01 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/x86_64/fpu/bits/mathinline.h: Include bits/wordsize.h.
+ (__signbitf, __signbit): Only use SSE inline asm for 64-bit.
+
2009-08-31 Andreas Schwab <schwab@redhat.com>
* sysdeps/x86_64/fpu/bits/mathinline.h: Use __asm instead of asm.
diff --git a/sysdeps/x86_64/fpu/bits/mathinline.h b/sysdeps/x86_64/fpu/bits/mathinline.h
index ece0f02..dc58f67 100644
--- a/sysdeps/x86_64/fpu/bits/mathinline.h
+++ b/sysdeps/x86_64/fpu/bits/mathinline.h
@@ -22,6 +22,8 @@
# error "Never use <bits/mathinline.h> directly; include <math.h> instead."
#endif
+#include <bits/wordsize.h>
+
#ifndef __extern_inline
# define __MATH_INLINE __inline
#else
@@ -35,16 +37,26 @@
__MATH_INLINE int
__NTH (__signbitf (float __x))
{
+#if __WORDSIZE == 32
+ __extension__ union { float __f; int __i; } __u = { __f: __x };
+ return __u.__i < 0;
+#else
int __m;
__asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
return __m & 0x8;
+#endif
}
__MATH_INLINE int
__NTH (__signbit (double __x))
{
+#if __WORDSIZE == 32
+ __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
+ return __u.__i[1] < 0;
+#else
int __m;
__asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
return __m & 0x80;
+#endif
}
__MATH_INLINE int
__NTH (__signbitl (long double __x))
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 21 ++++++
include/stdio.h | 1 +
libio/iofflush.c | 1 +
libio/wfileops.c | 110 ++++++++++------------------
sysdeps/powerpc/powerpc32/power6/memcpy.S | 2 +-
sysdeps/x86_64/fpu/bits/mathinline.h | 12 +++
6 files changed, 75 insertions(+), 72 deletions(-)
hooks/post-receive
--
GNU C Library master sources