[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r9882 - in /fsf/trunk/libc: ./ hurd/ hurd/hurd/ sysdeps/i386/i686/multiarch/



Author: eglibc
Date: Thu Feb 18 00:03:02 2010
New Revision: 9882

Log:
Import glibc-mainline for 2010-02-18

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/hurd/hurd/ioctl.h
    fsf/trunk/libc/hurd/hurdioctl.c
    fsf/trunk/libc/sysdeps/i386/i686/multiarch/memcmp-sse4.S
    fsf/trunk/libc/sysdeps/i386/i686/multiarch/memcmp-ssse3.S
    fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcmp-sse4.S
    fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcmp-ssse3.S

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Feb 18 00:03:02 2010
@@ -1,3 +1,26 @@
+2010-02-16  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	* sysdeps/i386/i686/multiarch/memcmp-sse4.S: Add alignnments.
+	Fix one unwind info problem.
+
+	* sysdeps/i386/i686/multiarch/memcmp-ssse3.S (less1bytes): Add CFI_POP.
+
+	* sysdeps/i386/i686/multiarch/strcmp-sse4.S: Simplify unwind info.
+
+2010-02-17  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+	    Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* sysdeps/i386/i686/multiarch/strcmp-ssse3.S: Fix typo in unwind info.
+	Clean up a bit.
+
+2010-02-17  Carl Fredrik Hammar  <hammy.lite@xxxxxxxxx>
+
+	* hurd/hurdioctl.c (tiocsctty): Only get FD ports, do work in...
+	(tiocsctty_port): ...this new function.
+
+	* hurd/hurd/ioctl.h (_HURD_HANDLE_IOCTLS_1): Cast to
+	`ioctl_handler_t'.
+
 2010-02-15  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* sysdeps/i386/i686/multiarch/memcmp-sse4.S: Fix unwind info.

Modified: fsf/trunk/libc/hurd/hurd/ioctl.h
==============================================================================
--- fsf/trunk/libc/hurd/hurd/ioctl.h (original)
+++ fsf/trunk/libc/hurd/hurd/ioctl.h Thu Feb 18 00:03:02 2010
@@ -57,7 +57,7 @@
   static const struct ioctl_handler handler##_ioctl_handler##moniker	      \
   	__attribute__ ((__unused__)) =					      \
     { _IOC_NOTYPE (first), _IOC_NOTYPE (last),				      \
-	(int (*) (int, int, void *)) (handler), NULL };	      		      \
+	(ioctl_handler_t) (handler), NULL };				      \
   text_set_element (_hurd_ioctl_handler_lists,				      \
                     handler##_ioctl_handler##moniker)
 #define	_HURD_HANDLE_IOCTLS(handler, first, last)			      \

Modified: fsf/trunk/libc/hurd/hurdioctl.c
==============================================================================
--- fsf/trunk/libc/hurd/hurdioctl.c (original)
+++ fsf/trunk/libc/hurd/hurdioctl.c Thu Feb 18 00:03:02 2010
@@ -1,5 +1,5 @@
 /* ioctl commands which must be done in the C library.
-   Copyright (C) 1994,95,96,97,99,2001,2002,2009
+   Copyright (C) 1994,95,96,97,99,2001,2002,2009,2010
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -239,6 +239,32 @@
 }
 
 
+static inline error_t
+do_tiocsctty (io_t port, io_t ctty)
+{
+  mach_port_t cttyid;
+  error_t err;
+
+  if (ctty != MACH_PORT_NULL)
+    /* PORT is already the ctty.  Nothing to do.  */
+    return 0;
+
+  /* Get PORT's cttyid port.  */
+  err = __term_getctty (port, &cttyid);
+  if (err)
+    return err;
+
+  /* Change the terminal's pgrp to ours.  */
+  err = __tioctl_tiocspgrp (port, _hurd_pgrp);
+  if (err)
+    __mach_port_deallocate (__mach_task_self (), cttyid);
+  else
+    /* Make it our own.  */
+    install_ctty (cttyid);
+
+  return err;
+}
+
 /* Make FD be the controlling terminal.
    This function is called for `ioctl (fd, TCIOSCTTY)'.  */
 
@@ -246,27 +272,7 @@
 tiocsctty (int fd,
 	   int request)		/* Always TIOCSCTTY.  */
 {
-  mach_port_t cttyid;
-  error_t err;
-
-  /* Get FD's cttyid port, unless it is already ours.  */
-  err = HURD_DPORT_USE (fd, ctty != MACH_PORT_NULL ? EADDRINUSE :
-			__term_getctty (port, &cttyid));
-  if (err == EADDRINUSE)
-    /* FD is already the ctty.  Nothing to do.  */
-    return 0;
-  else if (err)
-    return __hurd_fail (err);
-
-  /* Change the terminal's pgrp to ours.  */
-  err = HURD_DPORT_USE (fd, __tioctl_tiocspgrp (port, _hurd_pgrp));
-  if (err)
-    return __hurd_fail (err);
-
-  /* Make it our own.  */
-  install_ctty (cttyid);
-
-  return 0;
+  return __hurd_fail (HURD_DPORT_USE (fd, tiocsctty_port (port, ctty)));
 }
 _HURD_HANDLE_IOCTL (tiocsctty, TIOCSCTTY);
 

Modified: fsf/trunk/libc/sysdeps/i386/i686/multiarch/memcmp-sse4.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/i686/multiarch/memcmp-sse4.S (original)
+++ fsf/trunk/libc/sysdeps/i386/i686/multiarch/memcmp-sse4.S Thu Feb 18 00:03:02 2010
@@ -96,8 +96,9 @@
 	add	%ecx, %edx
 	add	%ecx, %eax
 	BRANCH_TO_JMPTBL_ENTRY(L(table_64bytes), %ecx, 4)
+
+	ALIGN (4)
 L(less8bytes):
-
 	mov	(%eax), %bl
 	cmpb	(%edx), %bl
 	jne	L(nonzero)
@@ -154,7 +155,6 @@
 	POP (%ebx)
 	xor	%eax, %eax
 	ret
-	CFI_PUSH (%ebx)
 
 	ALIGN (4)
 L(less1bytes):
@@ -207,6 +207,8 @@
 	add	%ecx, %edx
 	add	%ecx, %eax
 	BRANCH_TO_JMPTBL_ENTRY(L(table_64bytes), %ecx, 4)
+
+	ALIGN (4)
 L(find_16diff):
 	sub	$16, %ecx
 L(find_32diff):
@@ -217,8 +219,8 @@
 	add	%ecx, %edx
 	add	%ecx, %eax
 	jmp	L(16bytes)
-	ALIGN (4)
-
+
+	ALIGN (4)
 L(16bytes):
 	mov	-16(%eax), %ecx
 	mov	-16(%edx), %ebx
@@ -377,7 +379,7 @@
 	jne	L(end)
 	RETURN
 
-
+	ALIGN (4)
 L(52bytes):
 	movdqu	-52(%eax), %xmm1
 	movdqu	-52(%edx), %xmm2
@@ -406,6 +408,7 @@
 	jne	L(find_diff)
 	RETURN
 
+	ALIGN (4)
 L(53bytes):
 	movdqu	-53(%eax), %xmm1
 	movdqu	-53(%edx), %xmm2
@@ -437,6 +440,7 @@
 	jne	L(end)
 	RETURN
 
+	ALIGN (4)
 L(54bytes):
 	movdqu	-54(%eax), %xmm1
 	movdqu	-54(%edx), %xmm2
@@ -472,6 +476,7 @@
 	jne	L(end)
 	RETURN
 
+	ALIGN (4)
 L(55bytes):
 	movdqu	-55(%eax), %xmm1
 	movdqu	-55(%edx), %xmm2
@@ -509,6 +514,7 @@
 	jne	L(end)
 	RETURN
 
+	ALIGN (4)
 L(56bytes):
 	movdqu	-56(%eax), %xmm1
 	movdqu	-56(%edx), %xmm2
@@ -543,6 +549,7 @@
 	jne	L(find_diff)
 	RETURN
 
+	ALIGN (4)
 L(57bytes):
 	movdqu	-57(%eax), %xmm1
 	movdqu	-57(%edx), %xmm2
@@ -578,6 +585,7 @@
 	jne	L(end)
 	RETURN
 
+	ALIGN (4)
 L(58bytes):
 	movdqu	-58(%eax), %xmm1
 	movdqu	-58(%edx), %xmm2
@@ -619,6 +627,7 @@
 	jne	L(end)
 	RETURN
 
+	ALIGN (4)
 L(59bytes):
 	movdqu	-59(%eax), %xmm1
 	movdqu	-59(%edx), %xmm2
@@ -660,6 +669,7 @@
 	jne	L(end)
 	RETURN
 
+	ALIGN (4)
 L(60bytes):
 	movdqu	-60(%eax), %xmm1
 	movdqu	-60(%edx), %xmm2
@@ -696,6 +706,7 @@
 	jne	L(find_diff)
 	RETURN
 
+	ALIGN (4)
 L(61bytes):
 	movdqu	-61(%eax), %xmm1
 	movdqu	-61(%edx), %xmm2
@@ -738,6 +749,7 @@
 	jne	L(end)
 	RETURN
 
+	ALIGN (4)
 L(62bytes):
 	movdqu	-62(%eax), %xmm1
 	movdqu	-62(%edx), %xmm2
@@ -780,6 +792,7 @@
 	jne	L(end)
 	RETURN
 
+	ALIGN (4)
 L(63bytes):
 	movdqu	-63(%eax), %xmm1
 	movdqu	-63(%edx), %xmm2
@@ -826,6 +839,7 @@
 	jne	L(end)
 	RETURN
 
+	ALIGN (4)
 L(64bytes):
 	movdqu	-64(%eax), %xmm1
 	movdqu	-64(%edx), %xmm2
@@ -870,6 +884,7 @@
 	jne	L(find_diff)
 	RETURN
 
+	ALIGN (4)
 L(less16bytes):
 	add	%ebx, %eax
 	add	%ebx, %edx
@@ -914,8 +929,11 @@
 	neg	%eax
 L(bigger):
 	ret
-
+END (MEMCMP)
+
+	.section .rodata.sse4.2,"a",@progbits
 	ALIGN (2)
+	.type	L(table_64bytes), @object
 L(table_64bytes):
 	.int	JMPTBL (L(0bytes), L(table_64bytes))
 	.int	JMPTBL (L(1bytes), L(table_64bytes))
@@ -982,7 +1000,5 @@
 	.int	JMPTBL (L(62bytes), L(table_64bytes))
 	.int	JMPTBL (L(63bytes), L(table_64bytes))
 	.int	JMPTBL (L(64bytes), L(table_64bytes))
-
-END (MEMCMP)
-
+	.size	L(table_64bytes), .-L(table_64bytes)
 #endif

Modified: fsf/trunk/libc/sysdeps/i386/i686/multiarch/memcmp-ssse3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/i686/multiarch/memcmp-ssse3.S (original)
+++ fsf/trunk/libc/sysdeps/i386/i686/multiarch/memcmp-ssse3.S Thu Feb 18 00:03:02 2010
@@ -60,6 +60,7 @@
 	jmp	L(less48bytes)
 
 	ALIGN (4)
+	CFI_POP (%ebx)
 L(less1bytes):
 	jb	L(zero)
 	movb	(%eax), %cl
@@ -155,7 +156,6 @@
 	add	$32, %esi
 	sub	$0xffff, %edx
 	jnz	L(exit)
-
 
 	lea	(%ecx, %edi,1), %eax
 	lea	(%ecx, %esi,1), %edx
@@ -1662,7 +1662,6 @@
 	je	L(46bytes)
 	jmp	L(47bytes)
 
-
 	ALIGN (4)
 L(less48bytes):
 	cmp	$8, %ecx
@@ -1678,9 +1677,6 @@
 	cmp	$6, %ecx
 	je	L(6bytes)
 	jmp	L(7bytes)
-
-
-
 
 	ALIGN (4)
 L(44bytes):

Modified: fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcmp-sse4.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcmp-sse4.S (original)
+++ fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcmp-sse4.S Thu Feb 18 00:03:02 2010
@@ -40,6 +40,7 @@
 # endif
 # define STR1		4
 # define STR2		STR1+4
+# define RETURN		ret; .p2align 4
 #else
 # ifndef STRCMP
 #  define STRCMP	__strncmp_sse4_2
@@ -47,6 +48,7 @@
 # define STR1		8
 # define STR2		STR1+4
 # define CNT		STR2+4
+# define RETURN		POP (%ebp); ret; .p2align 4; CFI_PUSH (%ebp)
 #endif
 
 	.section .text.sse4.2,"ax",@progbits
@@ -223,6 +225,7 @@
 	add	$16, %esi
 	jmp	L(check_offset)
 
+	.p2align 4
 L(end):
 	jnc	L(ret)
 #ifdef USE_AS_STRNCMP
@@ -242,6 +245,7 @@
 #endif
 	ret
 
+	.p2align 4
 	cfi_restore_state
 #ifdef USE_AS_STRNCMP
 L(more16byteseq):
@@ -251,27 +255,15 @@
 #endif
 L(eq):
 	xorl	%eax, %eax
-#ifdef USE_AS_STRNCMP
-	POP	(%ebp)
-#endif
-	ret
-
-#ifdef USE_AS_STRNCMP
-	CFI_PUSH (%ebp)
-#endif
+	RETURN
+
 L(neq):
 	mov	$1, %eax
 	ja	L(neq_bigger)
 	neg	%eax
 L(neq_bigger):
-#ifdef USE_AS_STRNCMP
-	POP	(%ebp)
-#endif
-	ret
-	.p2align 4
-#ifdef USE_AS_STRNCMP
-	CFI_PUSH (%ebp)
-#endif
+	RETURN
+
 L(less16bytes):
 	add	$0xfefefeff, %ecx
 	jnc	L(less4bytes)

Modified: fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcmp-ssse3.S (original)
+++ fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcmp-ssse3.S Thu Feb 18 00:03:02 2010
@@ -40,6 +40,7 @@
 # endif
 # define STR1		4
 # define STR2		STR1+4
+# define RETURN		ret; .p2align 4
 # define UPDATE_STRNCMP_COUNTER
 #else
 # ifndef STRCMP
@@ -48,7 +49,7 @@
 # define STR1		8
 # define STR2		STR1+4
 # define CNT		STR2+4
-
+# define RETURN		POP (%ebp); ret; .p2align 4; CFI_PUSH (%ebp)
 # define UPDATE_STRNCMP_COUNTER				\
 	/* calculate left number to compare */		\
 	mov	$16, %esi;				\
@@ -1913,15 +1914,8 @@
 	movzx	7(%edx), %eax
 
 	sub	%ecx, %eax
-#ifdef USE_AS_STRNCMP
-	POP	(%ebp)
-#endif
-	ret
-
-	.p2align 4
-#ifdef USE_AS_STRNCMP
-	CFI_PUSH (%ebp)
-#endif
+	RETURN
+
 L(Byte0):
 #ifdef USE_AS_STRNCMP
 	cmp	$0, %ebp
@@ -1931,15 +1925,8 @@
 	movzx	(%edx), %eax
 
 	sub	%ecx, %eax
-#ifdef USE_AS_STRNCMP
-	POP	(%ebp)
-#endif
-	ret
-
-	.p2align 4
-#ifdef USE_AS_STRNCMP
-	CFI_PUSH (%ebp)
-#endif
+	RETURN
+
 L(Byte1):
 #ifdef USE_AS_STRNCMP
 	cmp	$1, %ebp
@@ -1949,15 +1936,8 @@
 	movzx	1(%edx), %eax
 
 	sub	%ecx, %eax
-#ifdef USE_AS_STRNCMP
-	POP	(%ebp)
-#endif
-	ret
-
-	.p2align 4
-#ifdef USE_AS_STRNCMP
-	CFI_PUSH (%ebp)
-#endif
+	RETURN
+
 L(Byte2):
 #ifdef USE_AS_STRNCMP
 	cmp	$2, %ebp
@@ -1967,15 +1947,8 @@
 	movzx	2(%edx), %eax
 
 	sub	%ecx, %eax
-#ifdef USE_AS_STRNCMP
-	POP	(%ebp)
-#endif
-	ret
-
-	.p2align 4
-#ifdef USE_AS_STRNCMP
-	CFI_PUSH (%ebp)
-#endif
+	RETURN
+
 L(Byte3):
 #ifdef USE_AS_STRNCMP
 	cmp	$3, %ebp
@@ -1985,15 +1958,8 @@
 	movzx	3(%edx), %eax
 
 	sub	%ecx, %eax
-#ifdef USE_AS_STRNCMP
-	POP	(%ebp)
-#endif
-	ret
-
-	.p2align 4
-#ifdef USE_AS_STRNCMP
-	CFI_PUSH (%ebp)
-#endif
+	RETURN
+
 L(Byte4):
 #ifdef USE_AS_STRNCMP
 	cmp	$4, %ebp
@@ -2003,15 +1969,8 @@
 	movzx	4(%edx), %eax
 
 	sub	%ecx, %eax
-#ifdef USE_AS_STRNCMP
-	POP	(%ebp)
-#endif
-	ret
-
-	.p2align 4
-#ifdef USE_AS_STRNCMP
-	CFI_PUSH (%ebp)
-#endif
+	RETURN
+
 L(Byte5):
 #ifdef USE_AS_STRNCMP
 	cmp	$5, %ebp
@@ -2021,15 +1980,8 @@
 	movzx	5(%edx), %eax
 
 	sub	%ecx, %eax
-#ifdef USE_AS_STRNCMP
-	POP	(%ebp)
-#endif
-	ret
-
-	.p2align 4
-#ifdef USE_AS_STRNCMP
-	CFI_PUSH (%ebp)
-#endif
+	RETURN
+
 L(Byte6):
 #ifdef USE_AS_STRNCMP
 	cmp	$6, %ebp
@@ -2039,15 +1991,8 @@
 	movzx	6(%edx), %eax
 
 	sub	%ecx, %eax
-#ifdef USE_AS_STRNCMP
-	POP	(%ebp)
-#endif
-	ret
-
-	.p2align 4
-#ifdef USE_AS_STRNCMP
-	CFI_PUSH (%ebp)
-#endif
+	RETURN
+
 L(2next_8_bytes):
 	add	$8, %eax
 	add	$8, %edx
@@ -2086,14 +2031,8 @@
 	movzx	7(%edx), %eax
 
 	sub	%ecx, %eax
-#ifdef USE_AS_STRNCMP
-	POP	(%ebp)
-#endif
-	ret
-
-#ifdef USE_AS_STRNCMP
-	CFI_PUSH (%ebp)
-#endif
+	RETURN
+
 L(neq):
 	mov	$1, %eax
 	ja	L(neq_bigger)
@@ -2105,7 +2044,8 @@
 	ret
 
 #ifdef USE_AS_STRNCMP
-	cfi_remember_state
+	.p2align 4
+	cfi_restore_state
 L(more8byteseq):
 	POP	(%esi)
 	POP	(%edi)
@@ -2121,6 +2061,7 @@
 	ret
 
 #ifdef USE_AS_STRNCMP
+	.p2align 4
 	CFI_PUSH (%ebp)
 L(less16bytes_sncmp):
 	test	%ebp, %ebp