[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r9661 - in /fsf/trunk/libc: ./ bits/ malloc/ nptl/ posix/ resolv/ stdlib/ string/ sysdeps/generic/netinet/ sysdeps/x86_64/
- To: commits@xxxxxxxxxx
- Subject: [commits] r9661 - in /fsf/trunk/libc: ./ bits/ malloc/ nptl/ posix/ resolv/ stdlib/ string/ sysdeps/generic/netinet/ sysdeps/x86_64/
- From: eglibc@xxxxxxxxxx
- Date: Fri, 15 Jan 2010 08:03:12 -0000
Author: eglibc
Date: Fri Jan 15 00:03:10 2010
New Revision: 9661
Log:
Import glibc-mainline for 2010-01-15
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/Makeconfig
fsf/trunk/libc/Versions.def
fsf/trunk/libc/bits/confname.h
fsf/trunk/libc/malloc/malloc.c
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/Versions
fsf/trunk/libc/nptl/pthread_mutex_consistent.c
fsf/trunk/libc/nptl/pthread_mutexattr_getrobust.c
fsf/trunk/libc/nptl/pthread_mutexattr_setrobust.c
fsf/trunk/libc/posix/regcomp.c
fsf/trunk/libc/posix/unistd.h
fsf/trunk/libc/resolv/netdb.h
fsf/trunk/libc/resolv/res_send.c
fsf/trunk/libc/stdlib/stdlib.h
fsf/trunk/libc/string/strings.h
fsf/trunk/libc/sysdeps/generic/netinet/ip.h
fsf/trunk/libc/sysdeps/x86_64/strcmp.S
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Jan 15 00:03:10 2010
@@ -1,3 +1,54 @@
+2010-01-14 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #11027]
+ * sysdeps/generic/netinet/ip.h: Define IPTOS_CLASS_* macros according
+ to RFC 2474.
+ Patch by Philip Prindeville <philipp@xxxxxxxxxxxxxxxxxxxxx>.
+
+ [BZ #11141]
+ * resolv/res_send.c (reopen): Don't use IPv6 sockets for IPv4
+ addresses.
+
+ [BZ #11127]
+ * posix/regcomp.c (alc_eclosure_iter): Do not ignore
+ re_node_set_insert failure; return REG_ESPACE.
+ Patch by Paul Eggert.
+
+ * bits/confname.h: Make pre-C99-safe.
+
+2010-01-14 Ryan S. Arnold <rsa@xxxxxxxxxx>
+
+ * Makeconfig (+prector, +postctor, +prectorS, +postctorS): Add
+ $(sysdep-LDFLAGS) to pre and post ctors so that the proper .o
+ files are found by GCC.
+
+2010-01-14 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * posix/unistd.h: Relax conditions for ualarm, usleep, getwd, vfork,
+ brk, and sbrk.
+
+ * string/strings.h: Relax condition for bcmp, bcopy, bzero, ffs,
+ index, and rindex.
+
+ * stdlib/stdlib.h: Relax conditions for *cvt functions and valloc.
+
+ * Versions.def: Add GLIBC_2.12 for libpthread.
+
+ [BZ #11126]
+ * malloc/malloc.c (malloc_info): Initialize malloc if not already
+ done. Handle empty bin lists.
+
+ * posix/unistd.h: Change getpagesize and getdtablesize declaration
+ visibility some more.
+
+ * resolv/netdb.h: Relax condition to elide obsolete resolver constants.
+
+ * posix/unistd.h: Declare getpagesize in _GNU_SOURCE mode.
+
+ [BZ #11120]
+ * sysdeps/x86_64/strcmp.S: Prevent silent errors should strncmp be
+ needed outside libc.
+
2010-01-13 Ulrich Drepper <drepper@xxxxxxxxxx>
* stdlib/stdlib.h: Parameter of unsetenv must not be NULL.
Modified: fsf/trunk/libc/Makeconfig
==============================================================================
--- fsf/trunk/libc/Makeconfig (original)
+++ fsf/trunk/libc/Makeconfig Fri Jan 15 00:03:10 2010
@@ -549,11 +549,11 @@
ifeq ($(elf),yes)
+preinit = $(addprefix $(csu-objpfx),crti.o)
+postinit = $(addprefix $(csu-objpfx),crtn.o)
-+prector = `$(CC) --print-file-name=crtbegin.o`
-+postctor = `$(CC) --print-file-name=crtend.o`
++prector = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbegin.o`
++postctor = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtend.o`
# Variants of the two previous definitions for linking PIE programs.
-+prectorS = `$(CC) --print-file-name=crtbeginS.o`
-+postctorS = `$(CC) --print-file-name=crtendS.o`
++prectorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginS.o`
++postctorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtendS.o`
+interp = $(addprefix $(elf-objpfx),interp.os)
endif
csu-objpfx = $(common-objpfx)csu/
Modified: fsf/trunk/libc/Versions.def
==============================================================================
--- fsf/trunk/libc/Versions.def (original)
+++ fsf/trunk/libc/Versions.def Fri Jan 15 00:03:10 2010
@@ -91,6 +91,7 @@
GLIBC_2.4
GLIBC_2.6
GLIBC_2.11
+ GLIBC_2.12
GLIBC_PRIVATE
}
libresolv {
Modified: fsf/trunk/libc/bits/confname.h
==============================================================================
--- fsf/trunk/libc/bits/confname.h (original)
+++ fsf/trunk/libc/bits/confname.h Fri Jan 15 00:03:10 2010
@@ -527,7 +527,7 @@
_SC_THREAD_ROBUST_PRIO_INHERIT,
#define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT
- _SC_THREAD_ROBUST_PRIO_PROTECT,
+ _SC_THREAD_ROBUST_PRIO_PROTECT
#define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT
};
Modified: fsf/trunk/libc/malloc/malloc.c
==============================================================================
--- fsf/trunk/libc/malloc/malloc.c (original)
+++ fsf/trunk/libc/malloc/malloc.c Fri Jan 15 00:03:10 2010
@@ -6369,16 +6369,19 @@
mbinptr bin = bin_at (ar_ptr, 1);
struct malloc_chunk *r = bin->fd;
- while (r != bin)
+ if (r != NULL)
{
- ++sizes[NFASTBINS].count;
- sizes[NFASTBINS].total += r->size;
- sizes[NFASTBINS].from = MIN (sizes[NFASTBINS].from, r->size);
- sizes[NFASTBINS].to = MAX (sizes[NFASTBINS].to, r->size);
- r = r->fd;
+ while (r != bin)
+ {
+ ++sizes[NFASTBINS].count;
+ sizes[NFASTBINS].total += r->size;
+ sizes[NFASTBINS].from = MIN (sizes[NFASTBINS].from, r->size);
+ sizes[NFASTBINS].to = MAX (sizes[NFASTBINS].to, r->size);
+ r = r->fd;
+ }
+ nblocks += sizes[NFASTBINS].count;
+ avail += sizes[NFASTBINS].total;
}
- nblocks += sizes[NFASTBINS].count;
- avail += sizes[NFASTBINS].total;
for (size_t i = 2; i < NBINS; ++i)
{
@@ -6388,17 +6391,18 @@
sizes[NFASTBINS - 1 + i].to = sizes[NFASTBINS - 1 + i].total
= sizes[NFASTBINS - 1 + i].count = 0;
- while (r != bin)
- {
- ++sizes[NFASTBINS - 1 + i].count;
- sizes[NFASTBINS - 1 + i].total += r->size;
- sizes[NFASTBINS - 1 + i].from = MIN (sizes[NFASTBINS - 1 + i].from,
+ if (r != NULL)
+ while (r != bin)
+ {
+ ++sizes[NFASTBINS - 1 + i].count;
+ sizes[NFASTBINS - 1 + i].total += r->size;
+ sizes[NFASTBINS - 1 + i].from
+ = MIN (sizes[NFASTBINS - 1 + i].from, r->size);
+ sizes[NFASTBINS - 1 + i].to = MAX (sizes[NFASTBINS - 1 + i].to,
r->size);
- sizes[NFASTBINS - 1 + i].to = MAX (sizes[NFASTBINS - 1 + i].to,
- r->size);
-
- r = r->fd;
- }
+
+ r = r->fd;
+ }
if (sizes[NFASTBINS - 1 + i].count == 0)
sizes[NFASTBINS - 1 + i].from = 0;
@@ -6460,6 +6464,9 @@
fputs ("</heap>\n", fp);
}
+ if(__malloc_initialized < 0)
+ ptmalloc_init ();
+
fputs ("<malloc version=\"1\">\n", fp);
/* Iterate over all arenas currently in use. */
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Fri Jan 15 00:03:10 2010
@@ -1,3 +1,13 @@
+2010-01-14 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
+ and pthread_mutexattr_setrobust for GLIBC_2.12.
+ * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
+ * pthread_mutexattr_getrobust.c: Define alias
+ pthread_mutexattr_getrobust.
+ * pthread_mutexattr_setrobust.c: Define alias
+ pthread_mutexattr_setrobust.
+
2010-01-12 Ulrich Drepper <drepper@xxxxxxxxxx>
* sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
Modified: fsf/trunk/libc/nptl/Versions
==============================================================================
--- fsf/trunk/libc/nptl/Versions (original)
+++ fsf/trunk/libc/nptl/Versions Fri Jan 15 00:03:10 2010
@@ -244,6 +244,11 @@
pthread_sigqueue;
};
+ GLIBC_2.12 {
+ pthread_mutex_consistent; pthread_mutexattr_getrobust;
+ pthread_mutexattr_setrobust;
+ };
+
GLIBC_PRIVATE {
__pthread_initialize_minimal;
__pthread_clock_gettime; __pthread_clock_settime;
Modified: fsf/trunk/libc/nptl/pthread_mutex_consistent.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_mutex_consistent.c (original)
+++ fsf/trunk/libc/nptl/pthread_mutex_consistent.c Fri Jan 15 00:03:10 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2005.
@@ -22,7 +22,7 @@
int
-pthread_mutex_consistent_np (mutex)
+pthread_mutex_consistent (mutex)
pthread_mutex_t *mutex;
{
/* Test whether this is a robust mutex with a dead owner. */
@@ -34,3 +34,4 @@
return 0;
}
+weak_alias (pthread_mutex_consistent, pthread_mutex_consistent_np)
Modified: fsf/trunk/libc/nptl/pthread_mutexattr_getrobust.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_mutexattr_getrobust.c (original)
+++ fsf/trunk/libc/nptl/pthread_mutexattr_getrobust.c Fri Jan 15 00:03:10 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2005.
@@ -21,7 +21,7 @@
int
-pthread_mutexattr_getrobust_np (attr, robustness)
+pthread_mutexattr_getrobust (attr, robustness)
const pthread_mutexattr_t *attr;
int *robustness;
{
@@ -34,3 +34,4 @@
return 0;
}
+weak_alias (pthread_mutexattr_getrobust, pthread_mutexattr_getrobust_np)
Modified: fsf/trunk/libc/nptl/pthread_mutexattr_setrobust.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_mutexattr_setrobust.c (original)
+++ fsf/trunk/libc/nptl/pthread_mutexattr_setrobust.c Fri Jan 15 00:03:10 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2005.
@@ -22,7 +22,7 @@
int
-pthread_mutexattr_setrobust_np (attr, robustness)
+pthread_mutexattr_setrobust (attr, robustness)
pthread_mutexattr_t *attr;
int robustness;
{
@@ -41,3 +41,4 @@
return 0;
}
+weak_alias (pthread_mutexattr_setrobust, pthread_mutexattr_setrobust_np)
Modified: fsf/trunk/libc/posix/regcomp.c
==============================================================================
--- fsf/trunk/libc/posix/regcomp.c (original)
+++ fsf/trunk/libc/posix/regcomp.c Fri Jan 15 00:03:10 2010
@@ -1,6 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002,2003,2004,2005,2006,2007,2009
- Free Software Foundation, Inc.
+ Copyright (C) 2002-2007,2009,2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@xxxxxxxxxxxxxx>.
@@ -616,7 +615,7 @@
re_dfastate_t *state = entry->array[j];
free_state (state);
}
- re_free (entry->array);
+ re_free (entry->array);
}
re_free (dfa->state_table);
#ifdef RE_ENABLE_I18N
@@ -1066,8 +1065,8 @@
}
break;
case OP_PERIOD:
- has_period = 1;
- break;
+ has_period = 1;
+ break;
case OP_BACK_REF:
case OP_ALT:
case END_OF_RE:
@@ -1080,7 +1079,7 @@
case SIMPLE_BRACKET:
/* Just double check. The non-ASCII range starts at 0x80. */
assert (0x80 % BITSET_WORD_BITS == 0);
- for (i = 0x80 / BITSET_WORD_BITS; i < BITSET_WORDS; ++i)
+ for (i = 0x80 / BITSET_WORD_BITS; i < BITSET_WORDS; ++i)
if (dfa->nodes[node].opr.sbcset[i])
return;
break;
@@ -1161,7 +1160,7 @@
{
dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len);
if (BE (dfa->inveclosures == NULL, 0))
- return REG_ESPACE;
+ return REG_ESPACE;
ret = calc_inveclosure (dfa);
}
@@ -1183,16 +1182,16 @@
if that's the only child). */
while (node->left || node->right)
if (node->left)
- node = node->left;
- else
- node = node->right;
+ node = node->left;
+ else
+ node = node->right;
do
{
reg_errcode_t err = fn (extra, node);
if (BE (err != REG_NOERROR, 0))
return err;
- if (node->parent == NULL)
+ if (node->parent == NULL)
return REG_NOERROR;
prev = node;
node = node->parent;
@@ -1226,7 +1225,7 @@
prev = node;
node = node->parent;
if (!node)
- return REG_NOERROR;
+ return REG_NOERROR;
}
node = node->right;
}
@@ -1249,13 +1248,13 @@
}
else if (node->token.type == SUBEXP
- && node->left && node->left->token.type == SUBEXP)
+ && node->left && node->left->token.type == SUBEXP)
{
int other_idx = node->left->token.opr.idx;
node->left = node->left->left;
if (node->left)
- node->left->parent = node;
+ node->left->parent = node;
dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx];
if (other_idx < BITSET_WORD_BITS)
@@ -1340,9 +1339,9 @@
node->first = node;
node->node_idx = re_dfa_add_node (dfa, node->token);
if (BE (node->node_idx == -1, 0))
- return REG_ESPACE;
+ return REG_ESPACE;
if (node->token.type == ANCHOR)
- dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type;
+ dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type;
}
return REG_NOERROR;
}
@@ -1364,7 +1363,7 @@
if (node->left)
node->left->next = node->next;
if (node->right)
- node->right->next = node->next;
+ node->right->next = node->next;
break;
}
return REG_NOERROR;
@@ -1643,9 +1642,10 @@
calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root)
{
reg_errcode_t err;
- int i, incomplete;
+ int i;
re_node_set eclosure;
- incomplete = 0;
+ int ret;
+ int incomplete = 0;
err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1);
if (BE (err != REG_NOERROR, 0))
return err;
@@ -1700,8 +1700,10 @@
}
}
- /* Epsilon closures include itself. */
- re_node_set_insert (&eclosure, node);
+ /* An epsilon closure includes itself. */
+ ret = re_node_set_insert (&eclosure, node);
+ if (BE (ret < 0, 0))
+ return REG_ESPACE;
if (incomplete && !root)
dfa->eclosures[node].nelem = 0;
else
@@ -2285,7 +2287,7 @@
&& dfa->word_ops_used == 0)
init_word_char (dfa);
if (token->opr.ctx_type == WORD_DELIM
- || token->opr.ctx_type == NOT_WORD_DELIM)
+ || token->opr.ctx_type == NOT_WORD_DELIM)
{
bin_tree_t *tree_first, *tree_last;
if (token->opr.ctx_type == WORD_DELIM)
@@ -2293,13 +2295,13 @@
token->opr.ctx_type = WORD_FIRST;
tree_first = create_token_tree (dfa, NULL, NULL, token);
token->opr.ctx_type = WORD_LAST;
- }
- else
- {
+ }
+ else
+ {
token->opr.ctx_type = INSIDE_WORD;
tree_first = create_token_tree (dfa, NULL, NULL, token);
token->opr.ctx_type = INSIDE_NOTWORD;
- }
+ }
tree_last = create_token_tree (dfa, NULL, NULL, token);
tree = create_tree (dfa, tree_first, tree_last, OP_ALT);
if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0))
@@ -2410,7 +2412,7 @@
{
tree = parse_reg_exp (regexp, preg, token, syntax, nest, err);
if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0))
- *err = REG_EPAREN;
+ *err = REG_EPAREN;
if (BE (*err != REG_NOERROR, 0))
return NULL;
}
@@ -2541,11 +2543,11 @@
elem = duplicate_tree (elem, dfa);
tree = create_tree (dfa, tree, elem, CONCAT);
if (BE (elem == NULL || tree == NULL, 0))
- goto parse_dup_op_espace;
+ goto parse_dup_op_espace;
tree = create_tree (dfa, tree, NULL, OP_ALT);
if (BE (tree == NULL, 0))
- goto parse_dup_op_espace;
+ goto parse_dup_op_espace;
}
if (old_tree)
@@ -2626,9 +2628,9 @@
no MBCSET if dfa->mb_cur_max == 1. */
if (mbcset)
{
- /* Check the space of the arrays. */
- if (BE (*range_alloc == mbcset->nranges, 0))
- {
+ /* Check the space of the arrays. */
+ if (BE (*range_alloc == mbcset->nranges, 0))
+ {
/* There is not enough space, need realloc. */
wchar_t *new_array_start, *new_array_end;
int new_nranges;
@@ -2638,9 +2640,9 @@
/* Use realloc since mbcset->range_starts and mbcset->range_ends
are NULL if *range_alloc == 0. */
new_array_start = re_realloc (mbcset->range_starts, wchar_t,
- new_nranges);
+ new_nranges);
new_array_end = re_realloc (mbcset->range_ends, wchar_t,
- new_nranges);
+ new_nranges);
if (BE (new_array_start == NULL || new_array_end == NULL, 0))
return REG_ESPACE;
@@ -2648,10 +2650,10 @@
mbcset->range_starts = new_array_start;
mbcset->range_ends = new_array_end;
*range_alloc = new_nranges;
- }
-
- mbcset->range_starts[mbcset->nranges] = start_wc;
- mbcset->range_ends[mbcset->nranges++] = end_wc;
+ }
+
+ mbcset->range_starts[mbcset->nranges] = start_wc;
+ mbcset->range_ends[mbcset->nranges++] = end_wc;
}
/* Build the table for single byte characters. */
@@ -2870,8 +2872,8 @@
build below suffices. */
if (nrules > 0 || dfa->mb_cur_max > 1)
{
- /* Check the space of the arrays. */
- if (BE (*range_alloc == mbcset->nranges, 0))
+ /* Check the space of the arrays. */
+ if (BE (*range_alloc == mbcset->nranges, 0))
{
/* There is not enough space, need realloc. */
uint32_t *new_array_start;
@@ -2883,18 +2885,18 @@
new_array_start = re_realloc (mbcset->range_starts, uint32_t,
new_nranges);
new_array_end = re_realloc (mbcset->range_ends, uint32_t,
- new_nranges);
+ new_nranges);
if (BE (new_array_start == NULL || new_array_end == NULL, 0))
- return REG_ESPACE;
+ return REG_ESPACE;
mbcset->range_starts = new_array_start;
mbcset->range_ends = new_array_end;
*range_alloc = new_nranges;
}
- mbcset->range_starts[mbcset->nranges] = start_collseq;
- mbcset->range_ends[mbcset->nranges++] = end_collseq;
+ mbcset->range_starts[mbcset->nranges] = start_collseq;
+ mbcset->range_ends[mbcset->nranges++] = end_collseq;
}
/* Build the table for single byte characters. */
@@ -3227,17 +3229,17 @@
of having both SIMPLE_BRACKET and COMPLEX_BRACKET. */
if (sbc_idx < BITSET_WORDS)
{
- /* Build a tree for simple bracket. */
- br_token.type = SIMPLE_BRACKET;
- br_token.opr.sbcset = sbcset;
- work_tree = create_token_tree (dfa, NULL, NULL, &br_token);
- if (BE (work_tree == NULL, 0))
- goto parse_bracket_exp_espace;
-
- /* Then join them by ALT node. */
- work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT);
- if (BE (work_tree == NULL, 0))
- goto parse_bracket_exp_espace;
+ /* Build a tree for simple bracket. */
+ br_token.type = SIMPLE_BRACKET;
+ br_token.opr.sbcset = sbcset;
+ work_tree = create_token_tree (dfa, NULL, NULL, &br_token);
+ if (BE (work_tree == NULL, 0))
+ goto parse_bracket_exp_espace;
+
+ /* Then join them by ALT node. */
+ work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT);
+ if (BE (work_tree == NULL, 0))
+ goto parse_bracket_exp_espace;
}
else
{
@@ -3256,7 +3258,7 @@
br_token.opr.sbcset = sbcset;
work_tree = create_token_tree (dfa, NULL, NULL, &br_token);
if (BE (work_tree == NULL, 0))
- goto parse_bracket_exp_espace;
+ goto parse_bracket_exp_espace;
}
return work_tree;
@@ -3809,7 +3811,7 @@
node = node->parent;
dup_node = dup_node->parent;
if (!node)
- return dup_root;
+ return dup_root;
}
node = node->right;
p_new = &dup_node->right;
Modified: fsf/trunk/libc/posix/unistd.h
==============================================================================
--- fsf/trunk/libc/posix/unistd.h (original)
+++ fsf/trunk/libc/posix/unistd.h Fri Jan 15 00:03:10 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2009, 2010 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
@@ -440,8 +440,8 @@
__THROW. */
extern unsigned int sleep (unsigned int __seconds);
-#if ((defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \
- && !defined __USE_XOPEN2K8) || defined __USE_GNU
+#if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) \
+ || defined __USE_BSD
/* Set an alarm to go off (generating a SIGALRM signal) in VALUE
microseconds. If INTERVAL is nonzero, when the alarm goes off, the
timer is reset to go off every INTERVAL microseconds thereafter.
@@ -514,8 +514,8 @@
extern char *get_current_dir_name (void) __THROW;
#endif
-#if ((defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \
- && !defined __USE_XOPEN2K8) || defined __USE_GNU
+#if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) \
+ || defined __USE_BSD
/* Put the absolute pathname of the current working directory in BUF.
If successful, return BUF. If not, put an error message in
BUF and return NULL. BUF should be at least PATH_MAX bytes long. */
@@ -774,14 +774,14 @@
and the process ID of the new process to the old process. */
extern __pid_t fork (void) __THROW;
-#if ((defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \
- && !defined __USE_XOPEN2K8) || defined __USE_GNU
+#if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) \
+ || defined __USE_BSD
/* Clone the calling process, but without copying the whole address space.
The calling process is suspended until the new process exits or is
replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
extern __pid_t vfork (void) __THROW;
-#endif /* Use BSD. */
+#endif /* Use BSD or XPG < 7. */
/* Return the pathname of the terminal FD is open on, or NULL on errors.
@@ -986,16 +986,16 @@
extern void sync (void) __THROW;
-# ifndef __USE_XOPEN2K
+# if defined __USE_BSD || !defined __USE_XOPEN2K
/* Return the number of bytes in a page. This is the system's page size,
which is not necessarily the same as the hardware page size. */
extern int getpagesize (void) __THROW __attribute__ ((__const__));
-# endif
/* Return the maximum number of file descriptors
the current process could possibly have. */
extern int getdtablesize (void) __THROW;
+# endif
#endif /* Use BSD || X/Open Unix. */
@@ -1039,8 +1039,8 @@
#endif /* Use BSD || X/Open Unix || POSIX 2003. */
-#if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) \
- && !defined __USE_XOPEN2K
+#if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) \
+ || defined __USE_MISC
/* Set the end of accessible data space (aka "the break") to ADDR.
Returns zero on success and -1 for errors (with errno set). */
Modified: fsf/trunk/libc/resolv/netdb.h
==============================================================================
--- fsf/trunk/libc/resolv/netdb.h (original)
+++ fsf/trunk/libc/resolv/netdb.h Fri Jan 15 00:03:10 2010
@@ -53,22 +53,22 @@
__BEGIN_DECLS
-#if defined __USE_GNU || !defined __USE_XOPEN2K8
+#if defined __USE_MISC || !defined __USE_XOPEN2K8
/* Error status for non-reentrant lookup functions.
We use a macro to access always the thread-specific `h_errno' variable. */
-#define h_errno (*__h_errno_location ())
+# define h_errno (*__h_errno_location ())
/* Function to get address of global `h_errno' variable. */
extern int *__h_errno_location (void) __THROW __attribute__ ((__const__));
/* Possible values left in `h_errno'. */
-#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found. */
-#define TRY_AGAIN 2 /* Non-Authoritative Host not found,
+# define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found. */
+# define TRY_AGAIN 2 /* Non-Authoritative Host not found,
or SERVERFAIL. */
-#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED,
+# define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED,
NOTIMP. */
-#define NO_DATA 4 /* Valid name, no data record of requested
+# define NO_DATA 4 /* Valid name, no data record of requested
type. */
#endif
#if defined __USE_MISC || defined __USE_GNU
@@ -87,7 +87,7 @@
# define SCOPE_DELIMITER '%'
#endif
-#if defined __USE_MISC || defined __USE_GNU
+#ifdef __USE_MISC
/* Print error indicated by `h_errno' variable on standard error. STR
if non-null is printed before the error string. */
extern void herror (__const char *__str) __THROW;
Modified: fsf/trunk/libc/resolv/res_send.c
==============================================================================
--- fsf/trunk/libc/resolv/res_send.c (original)
+++ fsf/trunk/libc/resolv/res_send.c Fri Jan 15 00:03:10 2010
@@ -198,10 +198,6 @@
static void Perror(const res_state, FILE *, const char *, int);
#endif
static int sock_eq(struct sockaddr_in6 *, struct sockaddr_in6 *);
-
-/* Reachover. */
-
-static void convaddr4to6(struct sockaddr_in6 *sa);
/* Public. */
@@ -911,10 +907,12 @@
reopen (res_state statp, int *terrno, int ns)
{
if (EXT(statp).nssocks[ns] == -1) {
- struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
+ struct sockaddr *nsap
+ = (struct sockaddr *) EXT(statp).nsaddrs[ns];
+ socklen_t slen;
/* only try IPv6 if IPv6 NS and if not failed before */
- if ((EXT(statp).nscount6 > 0) && !statp->ipv6_unavail) {
+ if (nsap->sa_family == AF_INET6 && !statp->ipv6_unavail) {
if (__builtin_expect (__have_o_nonblock >= 0, 1)) {
EXT(statp).nssocks[ns] =
socket(PF_INET6, SOCK_DGRAM|SOCK_NONBLOCK,
@@ -931,12 +929,8 @@
socket(PF_INET6, SOCK_DGRAM, 0);
if (EXT(statp).nssocks[ns] < 0)
statp->ipv6_unavail = errno == EAFNOSUPPORT;
- /* If IPv6 socket and nsap is IPv4, make it
- IPv4-mapped */
- else if (nsap->sin6_family == AF_INET)
- convaddr4to6(nsap);
- }
- if (EXT(statp).nssocks[ns] < 0) {
+ slen = sizeof (struct sockaddr_in6);
+ } else if (nsap->sa_family == AF_INET) {
if (__builtin_expect (__have_o_nonblock >= 0, 1)) {
EXT(statp).nssocks[ns]
= socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK,
@@ -951,6 +945,7 @@
if (__builtin_expect (__have_o_nonblock < 0, 0))
EXT(statp).nssocks[ns]
= socket(PF_INET, SOCK_DGRAM, 0);
+ slen = sizeof (struct sockaddr_in);
}
if (EXT(statp).nssocks[ns] < 0) {
*terrno = errno;
@@ -969,10 +964,8 @@
* error message is received. We can thus detect
* the absence of a nameserver without timing out.
*/
- if (connect(EXT(statp).nssocks[ns], (struct sockaddr *)nsap,
- sizeof *nsap) < 0) {
- Aerror(statp, stderr, "connect(dg)", errno,
- (struct sockaddr *) nsap);
+ if (connect(EXT(statp).nssocks[ns], nsap, slen) < 0) {
+ Aerror(statp, stderr, "connect(dg)", errno, nsap);
__res_iclose(statp, false);
return (0);
}
@@ -1415,22 +1408,3 @@
(a1->sin6_addr.s6_addr32[3] ==
((struct sockaddr_in *)a2)->sin_addr.s_addr));
}
-
-/*
- * Converts IPv4 family, address and port to
- * IPv6 family, IPv4-mapped IPv6 address and port.
- */
-static void
-convaddr4to6(struct sockaddr_in6 *sa)
-{
- struct sockaddr_in *sa4p = (struct sockaddr_in *) sa;
- in_port_t port = sa4p->sin_port;
- in_addr_t addr = sa4p->sin_addr.s_addr;
-
- sa->sin6_family = AF_INET6;
- sa->sin6_port = port;
- sa->sin6_addr.s6_addr32[0] = 0;
- sa->sin6_addr.s6_addr32[1] = 0;
- sa->sin6_addr.s6_addr32[2] = htonl(0xFFFF);
- sa->sin6_addr.s6_addr32[3] = addr;
-}
Modified: fsf/trunk/libc/stdlib/stdlib.h
==============================================================================
--- fsf/trunk/libc/stdlib/stdlib.h (original)
+++ fsf/trunk/libc/stdlib/stdlib.h Fri Jan 15 00:03:10 2010
@@ -497,8 +497,8 @@
# include <alloca.h>
#endif /* Use GNU, BSD, or misc. */
-#if ((defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \
- && !defined __USE_XOPEN2K) || defined __USE_GNU
+#if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) \
+ || defined __USE_BSD
/* Allocate SIZE bytes on a page boundary. The storage cannot be freed. */
extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur;
#endif
@@ -797,8 +797,8 @@
#endif
-#if ((defined __USE_SVID || defined __USE_XOPEN_EXTENDED) \
- && !defined __USE_XOPEN2K) || defined __USE_GNU
+#if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) \
+ || defined __USE_SVID
/* Convert floating point numbers to strings. The returned values are
valid only until another call to the same function. */
Modified: fsf/trunk/libc/string/strings.h
==============================================================================
--- fsf/trunk/libc/string/strings.h (original)
+++ fsf/trunk/libc/string/strings.h Fri Jan 15 00:03:10 2010
@@ -36,7 +36,7 @@
__BEGIN_DECLS
-# if !defined __USE_XOPEN2K8 || defined __USE_GNU
+# if defined __USE_MISC || !defined __USE_XOPEN2K8
/* Compare N bytes of S1 and S2 (same as memcmp). */
extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
__THROW __attribute_pure__;
@@ -104,7 +104,7 @@
# endif
# endif
-#if !defined __USE_XOPEN2K8 || defined __USE_XOPEN2K8XSI
+#if defined __USE_MISC || !defined __USE_XOPEN2K8 || defined __USE_XOPEN2K8XSI
/* Return the position of the first bit set in I, or 0 if none are set.
The least-significant bit is position 1, the most-significant 32. */
extern int ffs (int __i) __THROW __attribute__ ((const));
Modified: fsf/trunk/libc/sysdeps/generic/netinet/ip.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/netinet/ip.h (original)
+++ fsf/trunk/libc/sysdeps/generic/netinet/ip.h Fri Jan 15 00:03:10 2010
@@ -189,7 +189,26 @@
#define IPTOS_DSCP_EF 0xb8
/*
- * Definitions for IP type of service (ip_tos)
+ * In RFC 2474, Section 4.2.2.1, the Class Selector Codepoints subsume
+ * the old ToS Precedence values.
+ */
+
+#define IPTOS_CLASS_MASK 0xe0
+#define IPTOS_CLASS(class) ((tos) & IPTOS_CLASS_MASK)
+#define IPTOS_CLASS_CS0 0x00
+#define IPTOS_CLASS_CS1 0x20
+#define IPTOS_CLASS_CS2 0x40
+#define IPTOS_CLASS_CS3 0x60
+#define IPTOS_CLASS_CS4 0x80
+#define IPTOS_CLASS_CS5 0xa0
+#define IPTOS_CLASS_CS6 0xc0
+#define IPTOS_CLASS_CS7 0xe0
+
+#define IPTOS_CLASS_DEFAULT IPTOS_CLASS_CS0
+
+/*
+ * Definitions for IP type of service (ip_tos) [deprecated; use DSCP
+ * and CS definitions above instead.]
*/
#define IPTOS_TOS_MASK 0x1E
#define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK)
@@ -200,18 +219,18 @@
#define IPTOS_MINCOST IPTOS_LOWCOST
/*
- * Definitions for IP precedence (also in ip_tos) (hopefully unused)
- */
-#define IPTOS_PREC_MASK 0xe0
-#define IPTOS_PREC(tos) ((tos) & IPTOS_PREC_MASK)
-#define IPTOS_PREC_NETCONTROL 0xe0
-#define IPTOS_PREC_INTERNETCONTROL 0xc0
-#define IPTOS_PREC_CRITIC_ECP 0xa0
-#define IPTOS_PREC_FLASHOVERRIDE 0x80
-#define IPTOS_PREC_FLASH 0x60
-#define IPTOS_PREC_IMMEDIATE 0x40
-#define IPTOS_PREC_PRIORITY 0x20
-#define IPTOS_PREC_ROUTINE 0x00
+ * Definitions for IP precedence (also in ip_tos) [also deprecated.]
+ */
+#define IPTOS_PREC_MASK IPTOS_CLASS_MASK
+#define IPTOS_PREC(tos) IPTOS_CLASS(tos)
+#define IPTOS_PREC_NETCONTROL IPTOS_CLASS_CS7
+#define IPTOS_PREC_INTERNETCONTROL IPTOS_CLASS_CS6
+#define IPTOS_PREC_CRITIC_ECP IPTOS_CLASS_CS5
+#define IPTOS_PREC_FLASHOVERRIDE IPTOS_CLASS_CS4
+#define IPTOS_PREC_FLASH IPTOS_CLASS_CS3
+#define IPTOS_PREC_IMMEDIATE IPTOS_CLASS_CS2
+#define IPTOS_PREC_PRIORITY IPTOS_CLASS_CS1
+#define IPTOS_PREC_ROUTINE IPTOS_CLASS_CS0
/*
* Definitions for options.
Modified: fsf/trunk/libc/sysdeps/x86_64/strcmp.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/strcmp.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/strcmp.S Fri Jan 15 00:03:10 2010
@@ -1,5 +1,5 @@
/* Highly optimized version for x86-64.
- Copyright (C) 1999, 2000, 2002, 2003, 2005, 2009
+ Copyright (C) 1999, 2000, 2002, 2003, 2005, 2009, 2010
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Based on i686 version contributed by Ulrich Drepper
@@ -33,6 +33,13 @@
#endif
#ifdef USE_AS_STRNCMP
+/* The simplified code below is not set up to handle strncmp() so far.
+ Should this become necessary it has to be implemented. For now
+ just report the problem. */
+# ifdef NOT_IN_lib
+# error "strncmp not implemented so far"
+# endif
+
/* Since the counter, %r11, is unsigned, we branch to strcmp_exitz
if the new counter > the old one or is 0. */
# define UPDATE_STRNCMP_COUNTER \
@@ -54,7 +61,7 @@
#ifndef USE_SSSE3
.text
#else
- .section .text.ssse3,"ax",@progbits
+ .section .text.ssse3,"ax",@progbits
#endif
ENTRY (BP_SYM (STRCMP))
@@ -80,13 +87,13 @@
/*
* This implementation uses SSE to compare up to 16 bytes at a time.
*/
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
test %rdx, %rdx
je LABEL(strcmp_exitz)
cmp $1, %rdx
je LABEL(Byte0)
mov %rdx, %r11
-#endif
+# endif
mov %esi, %ecx
mov %edi, %eax
/* Use 64bit AND here to avoid long NOP padding. */
@@ -107,10 +114,10 @@
pmovmskb %xmm1, %edx
sub $0xffff, %edx /* if first 16 bytes are same, edx == 0xffff */
jnz LABEL(less16bytes) /* If not, find different value or null char */
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
sub $16, %r11
jbe LABEL(strcmp_exitz) /* finish comparision */
-#endif
+# endif
add $16, %rsi /* prepare to search next 16 bytes */
add $16, %rdi /* prepare to search next 16 bytes */
@@ -184,24 +191,24 @@
sub $0xffff, %edx
jnz LABEL(exit) /* mismatch or null char seen */
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
- add $16, %rcx
- movdqa (%rsi, %rcx), %xmm1
- movdqa (%rdi, %rcx), %xmm2
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
+ add $16, %rcx
+ movdqa (%rsi, %rcx), %xmm1
+ movdqa (%rdi, %rcx), %xmm2
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
jmp LABEL(loop_ashr_0)
@@ -249,25 +256,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4 /* store for next cycle */
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $1, %xmm3
pslldq $15, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $1, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -278,25 +285,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4 /* store for next cycle */
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $1, %xmm3
pslldq $15, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $1, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
jmp LABEL(loop_ashr_1)
@@ -312,10 +319,10 @@
test $0xfffe, %edx
jnz LABEL(ashr_1_exittail) /* find null char*/
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
cmp $14, %r11
jbe LABEL(ashr_1_exittail)
-#endif
+# endif
pxor %xmm0, %xmm0
sub $0x1000, %r10 /* substract 4K from %r10 */
@@ -334,7 +341,7 @@
/*
* The following cases will be handled by ashr_2
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
* n(14~15) n -14 1(15 +(n-14) - n) ashr_2
*/
.p2align 4
@@ -376,25 +383,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $2, %xmm3
pslldq $14, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $2, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -406,25 +413,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $2, %xmm3
pslldq $14, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $2, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -437,10 +444,10 @@
test $0xfffc, %edx
jnz LABEL(ashr_2_exittail)
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
cmp $13, %r11
jbe LABEL(ashr_2_exittail)
-#endif
+# endif
pxor %xmm0, %xmm0
sub $0x1000, %r10
@@ -498,25 +505,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $3, %xmm3
pslldq $13, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $3, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -528,25 +535,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $3, %xmm3
pslldq $13, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $3, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -559,10 +566,10 @@
test $0xfff8, %edx
jnz LABEL(ashr_3_exittail)
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
cmp $12, %r11
jbe LABEL(ashr_3_exittail)
-#endif
+# endif
pxor %xmm0, %xmm0
sub $0x1000, %r10
@@ -620,25 +627,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $4, %xmm3
pslldq $12, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $4, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -650,25 +657,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $4, %xmm3
pslldq $12, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $4, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -681,10 +688,10 @@
test $0xfff0, %edx
jnz LABEL(ashr_4_exittail)
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
cmp $11, %r11
jbe LABEL(ashr_4_exittail)
-#endif
+# endif
pxor %xmm0, %xmm0
sub $0x1000, %r10
@@ -700,7 +707,7 @@
/*
* The following cases will be handled by ashr_5
* rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(11~15) n - 11 4(15 +(n-11) - n) ashr_5
+ * n(11~15) n - 11 4(15 +(n-11) - n) ashr_5
*/
.p2align 4
LABEL(ashr_5):
@@ -742,25 +749,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $5, %xmm3
pslldq $11, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $5, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -772,25 +779,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $5, %xmm3
pslldq $11, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $5, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -803,10 +810,10 @@
test $0xffe0, %edx
jnz LABEL(ashr_5_exittail)
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
cmp $10, %r11
jbe LABEL(ashr_5_exittail)
-#endif
+# endif
pxor %xmm0, %xmm0
sub $0x1000, %r10
@@ -822,7 +829,7 @@
/*
* The following cases will be handled by ashr_6
* rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(10~15) n - 10 5(15 +(n-10) - n) ashr_6
+ * n(10~15) n - 10 5(15 +(n-10) - n) ashr_6
*/
.p2align 4
LABEL(ashr_6):
@@ -864,25 +871,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $6, %xmm3
pslldq $10, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $6, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -894,25 +901,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $6, %xmm3
pslldq $10, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $6, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -925,10 +932,10 @@
test $0xffc0, %edx
jnz LABEL(ashr_6_exittail)
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
cmp $9, %r11
jbe LABEL(ashr_6_exittail)
-#endif
+# endif
pxor %xmm0, %xmm0
sub $0x1000, %r10
@@ -944,7 +951,7 @@
/*
* The following cases will be handled by ashr_7
* rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(9~15) n - 9 6(15 +(n - 9) - n) ashr_7
+ * n(9~15) n - 9 6(15 +(n - 9) - n) ashr_7
*/
.p2align 4
LABEL(ashr_7):
@@ -986,25 +993,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $7, %xmm3
pslldq $9, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $7, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -1016,25 +1023,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $7, %xmm3
pslldq $9, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $7, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -1047,10 +1054,10 @@
test $0xff80, %edx
jnz LABEL(ashr_7_exittail)
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
cmp $8, %r11
jbe LABEL(ashr_7_exittail)
-#endif
+# endif
pxor %xmm0, %xmm0
sub $0x1000, %r10
@@ -1066,7 +1073,7 @@
/*
* The following cases will be handled by ashr_8
* rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(8~15) n - 8 7(15 +(n - 8) - n) ashr_8
+ * n(8~15) n - 8 7(15 +(n - 8) - n) ashr_8
*/
.p2align 4
LABEL(ashr_8):
@@ -1108,25 +1115,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $8, %xmm3
pslldq $8, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $8, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -1138,25 +1145,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $8, %xmm3
pslldq $8, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $8, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -1169,10 +1176,10 @@
test $0xff00, %edx
jnz LABEL(ashr_8_exittail)
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
cmp $7, %r11
jbe LABEL(ashr_8_exittail)
-#endif
+# endif
pxor %xmm0, %xmm0
sub $0x1000, %r10
@@ -1188,7 +1195,7 @@
/*
* The following cases will be handled by ashr_9
* rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(7~15) n - 7 8(15 +(n - 7) - n) ashr_9
+ * n(7~15) n - 7 8(15 +(n - 7) - n) ashr_9
*/
.p2align 4
LABEL(ashr_9):
@@ -1230,25 +1237,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $9, %xmm3
pslldq $7, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $9, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -1260,25 +1267,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $9, %xmm3
pslldq $7, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $9, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3 /* store for next cycle */
@@ -1291,10 +1298,10 @@
test $0xfe00, %edx
jnz LABEL(ashr_9_exittail)
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
cmp $6, %r11
jbe LABEL(ashr_9_exittail)
-#endif
+# endif
pxor %xmm0, %xmm0
sub $0x1000, %r10
@@ -1310,7 +1317,7 @@
/*
* The following cases will be handled by ashr_10
* rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(6~15) n - 6 9(15 +(n - 6) - n) ashr_10
+ * n(6~15) n - 6 9(15 +(n - 6) - n) ashr_10
*/
.p2align 4
LABEL(ashr_10):
@@ -1352,25 +1359,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $10, %xmm3
pslldq $6, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $10, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -1382,25 +1389,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $10, %xmm3
pslldq $6, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $10, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -1413,10 +1420,10 @@
test $0xfc00, %edx
jnz LABEL(ashr_10_exittail)
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
cmp $5, %r11
jbe LABEL(ashr_10_exittail)
-#endif
+# endif
pxor %xmm0, %xmm0
sub $0x1000, %r10
@@ -1432,7 +1439,7 @@
/*
* The following cases will be handled by ashr_11
* rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(5~15) n - 5 10(15 +(n - 5) - n) ashr_11
+ * n(5~15) n - 5 10(15 +(n - 5) - n) ashr_11
*/
.p2align 4
LABEL(ashr_11):
@@ -1474,25 +1481,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $11, %xmm3
pslldq $5, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $11, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -1504,25 +1511,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $11, %xmm3
pslldq $5, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $11, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -1535,10 +1542,10 @@
test $0xf800, %edx
jnz LABEL(ashr_11_exittail)
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
cmp $4, %r11
jbe LABEL(ashr_11_exittail)
-#endif
+# endif
pxor %xmm0, %xmm0
sub $0x1000, %r10
@@ -1554,7 +1561,7 @@
/*
* The following cases will be handled by ashr_12
* rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(4~15) n - 4 11(15 +(n - 4) - n) ashr_12
+ * n(4~15) n - 4 11(15 +(n - 4) - n) ashr_12
*/
.p2align 4
LABEL(ashr_12):
@@ -1596,25 +1603,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $12, %xmm3
pslldq $4, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $12, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -1626,25 +1633,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $12, %xmm3
pslldq $4, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $12, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -1657,10 +1664,10 @@
test $0xf000, %edx
jnz LABEL(ashr_12_exittail)
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
cmp $3, %r11
jbe LABEL(ashr_12_exittail)
-#endif
+# endif
pxor %xmm0, %xmm0
sub $0x1000, %r10
@@ -1676,7 +1683,7 @@
/*
* The following cases will be handled by ashr_13
* rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(3~15) n - 3 12(15 +(n - 3) - n) ashr_13
+ * n(3~15) n - 3 12(15 +(n - 3) - n) ashr_13
*/
.p2align 4
LABEL(ashr_13):
@@ -1718,25 +1725,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $13, %xmm3
pslldq $3, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $13, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -1748,25 +1755,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $13, %xmm3
pslldq $3, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $13, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -1779,10 +1786,10 @@
test $0xe000, %edx
jnz LABEL(ashr_13_exittail)
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
cmp $2, %r11
jbe LABEL(ashr_13_exittail)
-#endif
+# endif
pxor %xmm0, %xmm0
sub $0x1000, %r10
@@ -1798,7 +1805,7 @@
/*
* The following cases will be handled by ashr_14
* rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(2~15) n - 2 13(15 +(n - 2) - n) ashr_14
+ * n(2~15) n - 2 13(15 +(n - 2) - n) ashr_14
*/
.p2align 4
LABEL(ashr_14):
@@ -1840,25 +1847,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $14, %xmm3
pslldq $2, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $14, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -1870,25 +1877,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $14, %xmm3
pslldq $2, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $14, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -1901,10 +1908,10 @@
test $0xc000, %edx
jnz LABEL(ashr_14_exittail)
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
cmp $1, %r11
jbe LABEL(ashr_14_exittail)
-#endif
+# endif
pxor %xmm0, %xmm0
sub $0x1000, %r10
@@ -1920,7 +1927,7 @@
/*
* The following cases will be handled by ashr_15
* rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(1~15) n - 1 14(15 +(n - 1) - n) ashr_15
+ * n(1~15) n - 1 14(15 +(n - 1) - n) ashr_15
*/
.p2align 4
LABEL(ashr_15):
@@ -1964,25 +1971,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $15, %xmm3
pslldq $1, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $15, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -1994,25 +2001,25 @@
movdqa (%rdi, %rcx), %xmm2
movdqa %xmm2, %xmm4
-#ifndef USE_SSSE3
+# ifndef USE_SSSE3
psrldq $15, %xmm3
pslldq $1, %xmm2
por %xmm3, %xmm2 /* merge into one 16byte value */
-#else
+# else
palignr $15, %xmm3, %xmm2 /* merge into one 16byte value */
-#endif
-
- pcmpeqb %xmm1, %xmm0
- pcmpeqb %xmm2, %xmm1
- psubb %xmm0, %xmm1
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx
- jnz LABEL(exit)
-
-#ifdef USE_AS_STRNCMP
- sub $16, %r11
- jbe LABEL(strcmp_exitz)
-#endif
+# endif
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm2, %xmm1
+ psubb %xmm0, %xmm1
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx
+ jnz LABEL(exit)
+
+# ifdef USE_AS_STRNCMP
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+# endif
add $16, %rcx
movdqa %xmm4, %xmm3
@@ -2025,10 +2032,10 @@
test $0x8000, %edx
jnz LABEL(ashr_15_exittail)
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
test %r11, %r11
je LABEL(ashr_15_exittail)
-#endif
+# endif
pxor %xmm0, %xmm0
sub $0x1000, %r10
@@ -2062,10 +2069,10 @@
LABEL(less16bytes):
bsf %rdx, %rdx /* find and store bit index in %rdx */
-#ifdef USE_AS_STRNCMP
+# ifdef USE_AS_STRNCMP
sub %rdx, %r11
jbe LABEL(strcmp_exitz)
-#endif
+# endif
movzbl (%rsi, %rdx), %ecx
movzbl (%rdi, %rdx), %eax