[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r21015 - in /fsf/glibc-2_16-branch/libc: ./ stdio-common/ sysdeps/x86_64/multiarch/
- To: commits@xxxxxxxxxx
- Subject: [Commits] r21015 - in /fsf/glibc-2_16-branch/libc: ./ stdio-common/ sysdeps/x86_64/multiarch/
- From: eglibc@xxxxxxxxxx
- Date: Fri, 05 Oct 2012 00:05:05 -0000
Author: eglibc
Date: Fri Oct 5 00:05:04 2012
New Revision: 21015
Log:
Import glibc-2.16 for 2012-10-05
Modified:
fsf/glibc-2_16-branch/libc/ChangeLog
fsf/glibc-2_16-branch/libc/NEWS
fsf/glibc-2_16-branch/libc/stdio-common/Makefile
fsf/glibc-2_16-branch/libc/stdio-common/tst-sprintf.c
fsf/glibc-2_16-branch/libc/stdio-common/vfprintf.c
fsf/glibc-2_16-branch/libc/sysdeps/x86_64/multiarch/init-arch.c
fsf/glibc-2_16-branch/libc/sysdeps/x86_64/multiarch/init-arch.h
Modified: fsf/glibc-2_16-branch/libc/ChangeLog
==============================================================================
--- fsf/glibc-2_16-branch/libc/ChangeLog (original)
+++ fsf/glibc-2_16-branch/libc/ChangeLog Fri Oct 5 00:05:04 2012
@@ -1,3 +1,29 @@
+2012-10-04 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ [BZ #14648]
+ * sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features):
+ Set bit_FMA_Usable if FMA is supported.
+ * sysdeps/x86_64/multiarch/init-arch.h (bit_FMA_Usable): New
+ macro.
+ (bit_FMA4_Usable): Updated.
+ (index_FMA_Usable): New macro.
+ (CPUID_FMA): Likewise
+ (HAS_FMA): Defined with bit_FMA_Usable.
+
+2012-09-28 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
+
+ [BZ #6530]
+ * stdio-common/vfprintf.c (process_string_arg): Revert
+ 2000-07-22 change.
+
+2011-09-28 Jonathan Nieder <jrnieder@xxxxxxxxx>
+
+ * stdio-common/Makefile (tst-sprintf-ENV): Set environment
+ for testcase.
+ * stdio-common/tst-sprintf.c: Include <locale.h>
+ (main): Test sprintf's handling of incomplete multibyte
+ characters.
+
2012-09-25 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
[BZ #14621]
Modified: fsf/glibc-2_16-branch/libc/NEWS
==============================================================================
--- fsf/glibc-2_16-branch/libc/NEWS (original)
+++ fsf/glibc-2_16-branch/libc/NEWS Fri Oct 5 00:05:04 2012
@@ -9,7 +9,7 @@
* The following bugs are resolved with this release:
- 14195, 14459, 14476, 14562, 14621
+ 6530, 14195, 14459, 14476, 14562, 14621, 14648
Version 2.16
Modified: fsf/glibc-2_16-branch/libc/stdio-common/Makefile
==============================================================================
--- fsf/glibc-2_16-branch/libc/stdio-common/Makefile (original)
+++ fsf/glibc-2_16-branch/libc/stdio-common/Makefile Fri Oct 5 00:05:04 2012
@@ -116,6 +116,7 @@
# We know the test has a format string problem.
CFLAGS-tst-sprintf.c = -Wno-format
+tst-sprintf-ENV = LOCPATH=$(common-objpfx)localedata
tst-sscanf-ENV = LOCPATH=$(common-objpfx)localedata
tst-swprintf-ENV = LOCPATH=$(common-objpfx)localedata
test-vfprintf-ENV = LOCPATH=$(common-objpfx)localedata
Modified: fsf/glibc-2_16-branch/libc/stdio-common/tst-sprintf.c
==============================================================================
--- fsf/glibc-2_16-branch/libc/stdio-common/tst-sprintf.c (original)
+++ fsf/glibc-2_16-branch/libc/stdio-common/tst-sprintf.c Fri Oct 5 00:05:04 2012
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
+#include <locale.h>
#include <string.h>
@@ -58,5 +59,17 @@
result = 1;
}
+ if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
+ {
+ puts ("cannot set locale");
+ result = 1;
+ }
+ else if (sprintf (buf, "%.8s\n", "Foo: \277") != 7
+ || strcmp (buf, "Foo: \277\n") != 0)
+ {
+ printf ("sprintf (buf, \"%%.8s\\n\", \"Foo: \\277\") produced '%s' output\n", buf);
+ result = 1;
+ }
+
return result;
}
Modified: fsf/glibc-2_16-branch/libc/stdio-common/vfprintf.c
==============================================================================
--- fsf/glibc-2_16-branch/libc/stdio-common/vfprintf.c (original)
+++ fsf/glibc-2_16-branch/libc/stdio-common/vfprintf.c Fri Oct 5 00:05:04 2012
@@ -1168,42 +1168,9 @@
else if (!is_long && spec != L_('S')) \
{ \
if (prec != -1) \
- { \
- /* Search for the end of the string, but don't search past \
- the length (in bytes) specified by the precision. Also \
- don't use incomplete characters. */ \
- if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX) == 1) \
- len = __strnlen (string, prec); \
- else \
- { \
- /* In case we have a multibyte character set the \
- situation is more complicated. We must not copy \
- bytes at the end which form an incomplete character. */\
- size_t ignore_size = (unsigned) prec > 1024 ? 1024 : prec;\
- wchar_t ignore[ignore_size]; \
- const char *str2 = string; \
- const char *strend = string + prec; \
- if (strend < string) \
- strend = (const char *) UINTPTR_MAX; \
- \
- mbstate_t ps; \
- memset (&ps, '\0', sizeof (ps)); \
- \
- while (str2 != NULL && str2 < strend) \
- if (__mbsnrtowcs (ignore, &str2, strend - str2, \
- ignore_size, &ps) == (size_t) -1) \
- { \
- /* Conversion function has set errno. */ \
- done = -1; \
- goto all_done; \
- } \
- \
- if (str2 == NULL) \
- len = strlen (string); \
- else \
- len = str2 - string - (ps.__count & 7); \
- } \
- } \
+ /* Search for the end of the string, but don't search past \
+ the length (in bytes) specified by the precision. */ \
+ len = __strnlen (string, prec); \
else \
len = strlen (string); \
} \
Modified: fsf/glibc-2_16-branch/libc/sysdeps/x86_64/multiarch/init-arch.c
==============================================================================
--- fsf/glibc-2_16-branch/libc/sysdeps/x86_64/multiarch/init-arch.c (original)
+++ fsf/glibc-2_16-branch/libc/sysdeps/x86_64/multiarch/init-arch.c Fri Oct 5 00:05:04 2012
@@ -156,6 +156,9 @@
/* Determine if AVX is usable. */
if (CPUID_AVX)
__cpu_features.feature[index_AVX_Usable] |= bit_AVX_Usable;
+ /* Determine if FMA is usable. */
+ if (CPUID_FMA)
+ __cpu_features.feature[index_FMA_Usable] |= bit_FMA_Usable;
/* Determine if FMA4 is usable. */
if (CPUID_FMA4)
__cpu_features.feature[index_FMA4_Usable] |= bit_FMA4_Usable;
Modified: fsf/glibc-2_16-branch/libc/sysdeps/x86_64/multiarch/init-arch.h
==============================================================================
--- fsf/glibc-2_16-branch/libc/sysdeps/x86_64/multiarch/init-arch.h (original)
+++ fsf/glibc-2_16-branch/libc/sysdeps/x86_64/multiarch/init-arch.h Fri Oct 5 00:05:04 2012
@@ -22,7 +22,8 @@
#define bit_Fast_Unaligned_Load (1 << 4)
#define bit_Prefer_PMINUB_for_stringop (1 << 5)
#define bit_AVX_Usable (1 << 6)
-#define bit_FMA4_Usable (1 << 7)
+#define bit_FMA_Usable (1 << 7)
+#define bit_FMA4_Usable (1 << 8)
/* CPUID Feature flags. */
#define bit_SSE2 (1 << 26)
@@ -56,6 +57,7 @@
# define index_Fast_Unaligned_Load FEATURE_INDEX_1*FEATURE_SIZE
# define index_Prefer_PMINUB_for_stringop FEATURE_INDEX_1*FEATURE_SIZE
# define index_AVX_Usable FEATURE_INDEX_1*FEATURE_SIZE
+# define index_FMA_Usable FEATURE_INDEX_1*FEATURE_SIZE
# define index_FMA4_Usable FEATURE_INDEX_1*FEATURE_SIZE
#else /* __ASSEMBLER__ */
@@ -131,6 +133,8 @@
HAS_CPUID_FLAG (COMMON_CPUID_INDEX_1, ecx, bit_OSXSAVE)
# define CPUID_AVX \
HAS_CPUID_FLAG (COMMON_CPUID_INDEX_1, ecx, bit_AVX)
+# define CPUID_FMA \
+ HAS_CPUID_FLAG (COMMON_CPUID_INDEX_1, ecx, bit_FMA)
# define CPUID_FMA4 \
HAS_CPUID_FLAG (COMMON_CPUID_INDEX_80000001, ecx, bit_FMA4)
@@ -140,7 +144,6 @@
# define HAS_SSSE3 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_SSSE3)
# define HAS_SSE4_1 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_SSE4_1)
# define HAS_SSE4_2 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_SSE4_2)
-# define HAS_FMA HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_FMA)
# define index_Fast_Rep_String FEATURE_INDEX_1
# define index_Fast_Copy_Backward FEATURE_INDEX_1
@@ -148,6 +151,7 @@
# define index_Prefer_SSE_for_memop FEATURE_INDEX_1
# define index_Fast_Unaligned_Load FEATURE_INDEX_1
# define index_AVX_Usable FEATURE_INDEX_1
+# define index_FMA_Usable FEATURE_INDEX_1
# define index_FMA4_Usable FEATURE_INDEX_1
# define HAS_ARCH_FEATURE(name) \
@@ -159,6 +163,7 @@
# define HAS_PREFER_SSE_FOR_MEMOP HAS_ARCH_FEATURE (Prefer_SSE_for_memop)
# define HAS_FAST_UNALIGNED_LOAD HAS_ARCH_FEATURE (Fast_Unaligned_Load)
# define HAS_AVX HAS_ARCH_FEATURE (AVX_Usable)
+# define HAS_FMA HAS_ARCH_FEATURE (FMA_Usable)
# define HAS_FMA4 HAS_ARCH_FEATURE (FMA4_Usable)
#endif /* __ASSEMBLER__ */
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits