public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/12083] New: [IMPROVEMENT PROPOSITION] To have builtin function comparing memory backwards
@ 2003-08-27 20:44 yuri at tsoft dot com
  2003-08-27 21:09 ` [Bug c/12083] " yuri at tsoft dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: yuri at tsoft dot com @ 2003-08-27 20:44 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: [IMPROVEMENT PROPOSITION] To have builtin function
                    comparing memory backwards
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: yuri at tsoft dot com
                CC: gcc-bugs at gcc dot gnu dot org

Right now if code has function "memcmp" compiler will inline/optimize it into
"cld; repz cmpsb" - type of code inassembly on i386.

But if the problem is to compare backwards, assembly still can do it efficiently
just replacing cld with std and moving pointers to the end of block.

But from C this efficiency is unavailable.

I propose to add GCC-extention: add builtin function "gcc_rmemcmp" which
will compare memory in reverse direction.

Yuri (yuri at tsoft dot com).

PS: I will try to work on such patch myself once I have time.


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

* [Bug c/12083] [IMPROVEMENT PROPOSITION] To have builtin function comparing memory backwards
  2003-08-27 20:44 [Bug c/12083] New: [IMPROVEMENT PROPOSITION] To have builtin function comparing memory backwards yuri at tsoft dot com
@ 2003-08-27 21:09 ` yuri at tsoft dot com
  2003-08-27 21:11 ` zack at gcc dot gnu dot org
  2003-09-07  3:00 ` [Bug c/12083] " pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: yuri at tsoft dot com @ 2003-08-27 21:09 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


yuri at tsoft dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


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

* [Bug c/12083] [IMPROVEMENT PROPOSITION] To have builtin function comparing memory backwards
  2003-08-27 20:44 [Bug c/12083] New: [IMPROVEMENT PROPOSITION] To have builtin function comparing memory backwards yuri at tsoft dot com
  2003-08-27 21:09 ` [Bug c/12083] " yuri at tsoft dot com
@ 2003-08-27 21:11 ` zack at gcc dot gnu dot org
  2003-09-07  3:00 ` [Bug c/12083] " pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: zack at gcc dot gnu dot org @ 2003-08-27 21:11 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From zack at gcc dot gnu dot org  2003-08-27 21:11 -------
The appropriate name for such an intrinsic would be __builtin_rmemcmp.

I admit to not seeing the utility, but additional intrinsics don't cost much,
and you must have a use for such a thing.


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

* [Bug c/12083] have builtin function comparing memory backwards
  2003-08-27 20:44 [Bug c/12083] New: [IMPROVEMENT PROPOSITION] To have builtin function comparing memory backwards yuri at tsoft dot com
  2003-08-27 21:09 ` [Bug c/12083] " yuri at tsoft dot com
  2003-08-27 21:11 ` zack at gcc dot gnu dot org
@ 2003-09-07  3:00 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-07  3:00 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Priority|P2                          |P3
   Last reconfirmed|0000-00-00 00:00:00         |2003-09-07 03:00:54
               date|                            |
            Summary|[IMPROVEMENT PROPOSITION] To|have builtin function
                   |have builtin function       |comparing memory backwards
                   |comparing memory backwards  |


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

end of thread, other threads:[~2003-09-07  3:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-27 20:44 [Bug c/12083] New: [IMPROVEMENT PROPOSITION] To have builtin function comparing memory backwards yuri at tsoft dot com
2003-08-27 21:09 ` [Bug c/12083] " yuri at tsoft dot com
2003-08-27 21:11 ` zack at gcc dot gnu dot org
2003-09-07  3:00 ` [Bug c/12083] " pinskia at gcc dot gnu dot org

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).