Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 364926 Details for
Bug 493648
sys-libs/newlib-2.0.0 - non-assembly memset broken with -O3
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
inhibit_loop_to_libcall.patch
inhibit_loop_to_libcall.patch (text/plain), 2.18 KB, created by
Alexander Holler
on 2013-12-08 12:18:45 UTC
(
hide
)
Description:
inhibit_loop_to_libcall.patch
Filename:
MIME Type:
Creator:
Alexander Holler
Created:
2013-12-08 12:18:45 UTC
Size:
2.18 KB
patch
obsolete
>diff -Naur newlib-2.0.0.orig/newlib/libc/string/memmove.c newlib-2.0.0/newlib/libc/string/memmove.c >--- newlib-2.0.0.orig/newlib/libc/string/memmove.c 2010-09-22 05:15:07.000000000 +0200 >+++ newlib-2.0.0/newlib/libc/string/memmove.c 2013-12-08 05:17:00.450248311 +0100 >@@ -40,6 +40,22 @@ > #include <stddef.h> > #include <limits.h> > >+/* hack because currently I don't want to fiddle with autoconf */ >+#define HAVE_CC_INHIBIT_LOOP_TO_LIBCALL >+ >+/* >+ Taken from glibc: >+ Add the compiler optimization to inhibit loop transformation to library >+ calls. This is used to avoid recursive calls in memset and memmove >+ default implementations. >+*/ >+#ifdef HAVE_CC_INHIBIT_LOOP_TO_LIBCALL >+# define inhibit_loop_to_libcall \ >+ __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns"))) >+#else >+# define inhibit_loop_to_libcall >+#endif >+ > /* Nonzero if either X or Y is not aligned on a "long" boundary. */ > #define UNALIGNED(X, Y) \ > (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) >@@ -55,6 +71,7 @@ > > /*SUPPRESS 20*/ > _PTR >+inhibit_loop_to_libcall > _DEFUN (memmove, (dst_void, src_void, length), > _PTR dst_void _AND > _CONST _PTR src_void _AND >diff -Naur newlib-2.0.0.orig/newlib/libc/string/memset.c newlib-2.0.0/newlib/libc/string/memset.c >--- newlib-2.0.0.orig/newlib/libc/string/memset.c 2008-05-27 20:44:40.000000000 +0200 >+++ newlib-2.0.0/newlib/libc/string/memset.c 2013-12-08 05:16:27.830247253 +0100 >@@ -35,11 +35,28 @@ > > #include <string.h> > >+/* hack because currently I don't want to fiddle with autoconf */ >+#define HAVE_CC_INHIBIT_LOOP_TO_LIBCALL >+ >+/* >+ Taken from glibc: >+ Add the compiler optimization to inhibit loop transformation to library >+ calls. This is used to avoid recursive calls in memset and memmove >+ default implementations. >+*/ >+#ifdef HAVE_CC_INHIBIT_LOOP_TO_LIBCALL >+# define inhibit_loop_to_libcall \ >+ __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns"))) >+#else >+# define inhibit_loop_to_libcall >+#endif >+ > #define LBLOCKSIZE (sizeof(long)) > #define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1)) > #define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE) > > _PTR >+inhibit_loop_to_libcall > _DEFUN (memset, (m, c, n), > _PTR m _AND > int c _AND
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 493648
:
364926
|
365044