This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/36502] New: i386/darwin generates unnecessary stack ops in every function


> gcc -v
Using built-in specs.
Target: i386-apple-darwin9.2.2
Configured with: ../gcc/configure --prefix=/usr/local/gcc44
--enable-threads=posix --with-arch=core2 --with-tune=core2 --with-gmp=/sw
--with-mpfr=/sw --disable-nls --disable-bootstrap --enable-checking=yes,rtl
--enable-languages=c,c++,objc
Thread model: posix
gcc version 4.4.0 20080611 (experimental) (GCC) 

gcc changes esp in every function, even if it has no stack values. Given:
    int a;
    void f() {a++;}

> gcc -O -fomit-frame-pointer -fno-pic -S add.c
_f:
        subl    $12, %esp
        incl    _a
        addl    $12, %esp
        ret

Apple's GCC doesn't do this and neither does 4.4 on other systems (as far as I
know).


-- 
           Summary: i386/darwin generates unnecessary stack ops in every
                    function
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: astrange at ithinksw dot com
GCC target triplet: i386-apple-darwin*


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]