public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/31852]  New: Missing __builtin_memchr
@ 2007-05-07  9:45 pcarlini at suse dot de
  2007-05-07 11:04 ` [Bug other/31852] " rguenth at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pcarlini at suse dot de @ 2007-05-07  9:45 UTC (permalink / raw)
  To: gcc-bugs

It would be nice to have a builtin for memchr too, for many reasons. For
example, on the C++ library side, char_traits<char>::find could be better
optimized; we could avoid including <cstring> anywhere in the headers
(__builtin_memcpy, memmove, memset, memcmp are already available!)...


-- 
           Summary: Missing __builtin_memchr
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pcarlini at suse dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31852


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug other/31852] Missing __builtin_memchr
  2007-05-07  9:45 [Bug other/31852] New: Missing __builtin_memchr pcarlini at suse dot de
@ 2007-05-07 11:04 ` rguenth at gcc dot gnu dot org
  2007-05-09  0:34 ` pcarlini at suse dot de
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-05-07 11:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2007-05-07 12:04 -------
Confirmed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-05-07 12:04:29
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31852


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug other/31852] Missing __builtin_memchr
  2007-05-07  9:45 [Bug other/31852] New: Missing __builtin_memchr pcarlini at suse dot de
  2007-05-07 11:04 ` [Bug other/31852] " rguenth at gcc dot gnu dot org
@ 2007-05-09  0:34 ` pcarlini at suse dot de
  2007-05-11 11:49 ` paolo at gcc dot gnu dot org
  2007-05-11 11:51 ` pcarlini at suse dot de
  3 siblings, 0 replies; 5+ messages in thread
From: pcarlini at suse dot de @ 2007-05-09  0:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pcarlini at suse dot de  2007-05-09 01:34 -------
I have a draft...


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pcarlini at suse dot de
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-05-07 12:04:29         |2007-05-09 01:34:09
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31852


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug other/31852] Missing __builtin_memchr
  2007-05-07  9:45 [Bug other/31852] New: Missing __builtin_memchr pcarlini at suse dot de
  2007-05-07 11:04 ` [Bug other/31852] " rguenth at gcc dot gnu dot org
  2007-05-09  0:34 ` pcarlini at suse dot de
@ 2007-05-11 11:49 ` paolo at gcc dot gnu dot org
  2007-05-11 11:51 ` pcarlini at suse dot de
  3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu dot org @ 2007-05-11 11:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from paolo at gcc dot gnu dot org  2007-05-11 12:49 -------
Subject: Bug 31852

Author: paolo
Date: Fri May 11 11:49:29 2007
New Revision: 124617

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124617
Log:
2007-05-11  Paolo Carlini  <pcarlini@suse.de>

        PR other/31852
        * builtin-types.def: Add BT_FN_PTR_CONST_PTR_INT_SIZE.
        * builtins.def: Add BUILT_IN_MEMCHR, use the latter.
        * builtins.c (fold_builtin_memchr): New.
        (expand_builtin_memchr): Call the latter.
        (expand_builtin, fold_builtin_3): Deal with BUILT_IN_MEMCHR.
        * doc/extend.texi ([Other built-in functions provided by GCC]):
        Document memchr.

/testsuite
2007-05-11  Paolo Carlini  <pcarlini@suse.de>

        PR other/31852
        * gcc.c-torture/execute/builtins/memchr.c: New.
        * gcc.c-torture/execute/builtins/memchr-lib.c: New.
        * gcc.c-torture/execute/builtins/lib/memchr.c: New.

Added:
    trunk/gcc/testsuite/gcc.c-torture/execute/builtins/lib/memchr.c
    trunk/gcc/testsuite/gcc.c-torture/execute/builtins/memchr-lib.c
    trunk/gcc/testsuite/gcc.c-torture/execute/builtins/memchr.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtin-types.def
    trunk/gcc/builtins.c
    trunk/gcc/builtins.def
    trunk/gcc/doc/extend.texi
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31852


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug other/31852] Missing __builtin_memchr
  2007-05-07  9:45 [Bug other/31852] New: Missing __builtin_memchr pcarlini at suse dot de
                   ` (2 preceding siblings ...)
  2007-05-11 11:49 ` paolo at gcc dot gnu dot org
@ 2007-05-11 11:51 ` pcarlini at suse dot de
  3 siblings, 0 replies; 5+ messages in thread
From: pcarlini at suse dot de @ 2007-05-11 11:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pcarlini at suse dot de  2007-05-11 12:50 -------
Added for 4.3.0.


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31852


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-05-11 11:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-07  9:45 [Bug other/31852] New: Missing __builtin_memchr pcarlini at suse dot de
2007-05-07 11:04 ` [Bug other/31852] " rguenth at gcc dot gnu dot org
2007-05-09  0:34 ` pcarlini at suse dot de
2007-05-11 11:49 ` paolo at gcc dot gnu dot org
2007-05-11 11:51 ` pcarlini at suse dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).