public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <bug-11877-4@http.gcc.gnu.org/bugzilla/>]
* [Bug target/11877] New: gcc should use xor trick with -Os
@ 2003-08-10 15:47 debian-gcc at lists dot debian dot org
  2003-08-10 16:03 ` [Bug target/11877] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2003-08-10 15:47 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=11877

           Summary: gcc should use xor trick with -Os
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org
                CC: gcc-bugs at gcc dot gnu dot org,herbert at gondor dot
                    apana dot org dot au
 GCC build triplet: 386-linux
  GCC host triplet: i386-linux
GCC target triplet: 386-linux

[forwarded from http://bugs.debian.org/204687]

The program 
 
-- 
#include <linux/time.h> 
 
void foo(struct timespec *t, struct timespec *u) 
{ 
        struct timespec zero = {0, 0}; 
 
        *t = zero; 
        *u = zero; 
} 
-- 
 
produces the following code on i386 with -Os 
 
-- 
        .file   "b.c" 
        .text 
.globl foo 
        .type   foo, @function 
foo: 
        pushl   %ebp 
        movl    %esp, %ebp 
        movl    8(%ebp), %eax 
        movl    $0, (%eax) 
        movl    $0, 4(%eax) 
        movl    12(%ebp), %eax 
        movl    $0, (%eax) 
        movl    $0, 4(%eax) 
        leave 
        ret 
        .size   foo, .-foo 
        .ident  "GCC: (GNU) 3.3.1 20030626 (Debian prerelease)" 
-- 
 
It would be much better size-wise if it stored a zero in a register 
and then stored the register into those locations.


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

end of thread, other threads:[~2021-07-26 22:20 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-11877-5724@http.gcc.gnu.org/bugzilla/>
2006-01-05 20:22 ` [Bug target/11877] gcc should use xor trick with -Os dann at godzilla dot ics dot uci dot edu
     [not found] <bug-11877-4@http.gcc.gnu.org/bugzilla/>
2021-06-21  7:56 ` cvs-commit at gcc dot gnu.org
2021-06-22  8:18 ` cvs-commit at gcc dot gnu.org
2021-07-10  8:24 ` roger at nextmovesoftware dot com
2021-07-26 18:54 ` pinskia at gcc dot gnu.org
2021-07-26 18:57 ` pinskia at gcc dot gnu.org
2021-07-26 22:20 ` pinskia at gcc dot gnu.org
2003-08-10 15:47 [Bug target/11877] New: " debian-gcc at lists dot debian dot org
2003-08-10 16:03 ` [Bug target/11877] " pinskia at gcc dot gnu dot org
2003-08-23  1:15 ` dhazeghi at yahoo dot com
2003-12-31 21:39 ` kazu at cs dot umass dot edu
2004-01-04  6:55 ` kazu at cs dot umass dot edu
2004-01-04  7:50 ` pinskia at gcc dot gnu dot org
2004-02-01 17:24 ` kazu at cs dot umass dot edu
2004-03-25 19:16 ` kazu at cs dot umass dot edu
2005-08-12  5:28 ` pinskia at gcc dot gnu dot org
2005-08-12  5:28 ` 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).