public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/17237] New: inefficient parameter passing on x86
@ 2004-08-30  5:58 dann at godzilla dot ics dot uci dot edu
  2004-10-06 23:36 ` [Bug rtl-optimization/17237] " giovannibajo at libero dot it
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2004-08-30  5:58 UTC (permalink / raw)
  To: gcc-bugs

Compiling:
unsigned long long LLD(unsigned long long arg1, unsigned long long arg2)
{
  return arg1 /  arg2;
}

with gcc -O2 -fomit-frame-pointer generates:
        subl    $28, %esp
        movl    40(%esp), %eax
        movl    44(%esp), %edx
        movl    %eax, 8(%esp)
        movl    32(%esp), %eax
        movl    %edx, 12(%esp)
        movl    36(%esp), %edx
        movl    %eax, (%esp)
        movl    %edx, 4(%esp)
        call    __udivdi3
        addl    $28, %esp
        ret

which is 48 bytes.

The ICC generated code is 28 bytes:

        pushl     16(%esp)                                      #521.17
        pushl     16(%esp)                                      #521.17
        pushl     16(%esp)                                      #521.17
        pushl     16(%esp)                                      #521.17
        call      __udivdi3                                     #521.17
        addl      $16, %esp                                     #521.17
        ret                                                     #521.17

-- 
           Summary: inefficient parameter passing on x86
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dann at godzilla dot ics dot uci dot edu
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2004-10-07 19:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-30  5:58 [Bug rtl-optimization/17237] New: inefficient parameter passing on x86 dann at godzilla dot ics dot uci dot edu
2004-10-06 23:36 ` [Bug rtl-optimization/17237] " giovannibajo at libero dot it
2004-10-07  0:05 ` dann at godzilla dot ics dot uci dot edu
2004-10-07  0:26 ` giovannibajo at libero dot it
2004-10-07  0:26 ` [Bug rtl-optimization/17237] inefficient parameter passing on x86 (useless stack space allocated) giovannibajo at libero dot it
2004-10-07 19:55 ` rth at gcc dot gnu dot org
2004-10-07 19:57 ` 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).