Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GCC 3.3 can't inline?!?



I was profiling my code when I noticed that inline code was inlined. I found this <http://list-archive.xemacs.org/xemacs-beta/200305/msg00361.html>

Then I tried inlining (__inline__) something simple and it still made it a function call (see below). I'm using gcc version 3.3 20030304 (Apple Computer, Inc. build 1666). and tried -finline-functions.

So, this still seems true, but i've never heard apple say anything! Is this fixed for 10.4?!?

static __inline__ void _test_1(unsigned char __count) {
    __asm__ __volatile__ ("isync \n");
}

 int main(void)
 {
    unsigned char testB = 1;
    _test_1(testB);
    return 0;
}


assembly outputed (gcc inline_test.c -S), no warnings or errors!

[snip]
        mr r3,r0
        bl __test_1

[snip]
__test_1:
        stmw r30,-8(r1)
        stwu r1,-48(r1)
        mr r30,r1
        mr r0,r3
        stb r0,72(r30)
        isync

        lwz r1,0(r1)
        lmw r30,-8(r1)
        blr



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Scitech mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/scitech/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.