Well, yeah, except...

~:$ cat hello.c
#include <stdio.h>

main()
{
    printf("Hello, world!\n");
}
~:$ wc hello.c
       6       7      62 hello.c
~:$ cc -S hello.c
~:$ wc hello.s
      45      79    1025 hello.s
~:$ ls -s a.out
40 a.out
~:$


Or...


~:$ cat hello.c
#include <stdio.h>

main()
{
    printf("Hello, world!\n");
}
~:$ cat hello.s
        .section __TEXT,__text,regular,pure_instructions
.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
        .machine ppc
        .cstring
        .align 2
LC0:
        .ascii "Hello, world!\12\0"
        .text
        .align 2
        .globl _main
_main:
        mflr r0
        stmw r30,-8(r1)
        stw r0,8(r1)
        stwu r1,-80(r1)
        mr r30,r1
        bcl 20,31,"L00000000001$pb"
"L00000000001$pb":
        mflr r31
        addis r2,r31,ha16(LC0-"L00000000001$pb")
        la r3,lo16(LC0-"L00000000001$pb")(r2)
        bl L_printf$LDBLStub$stub
        lwz r1,0(r1)
        lwz r0,8(r1)
        mtlr r0
        lmw r30,-8(r1)
        blr
.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
        .align 5
L_printf$LDBLStub$stub:
        .indirect_symbol _printf$LDBLStub
        mflr r0
        bcl 20,31,"L00000000001$spb"
"L00000000001$spb":
        mflr r11
addis r11,r11,ha16(L_printf$LDBLStub$lazy_ptr-"L00000000001 $spb")
        mtlr r0
lwzu r12,lo16(L_printf$LDBLStub$lazy_ptr-"L00000000001$spb") (r11)
        mtctr r12
        bctr
        .lazy_symbol_pointer
L_printf$LDBLStub$lazy_ptr:
        .indirect_symbol _printf$LDBLStub
        .long   dyld_stub_binding_helper
        .subsections_via_symbols
~:$


At least that is somewhat sensible!

===
Gregory Woodhouse
[EMAIL PROTECTED]

"The whole of science is nothing more than a refinement
 of everyday thinking."  -- Albert Einstein


On Jul 11, 2005, at 2:57 PM, Kevin Toppenberg wrote:

Along these lines, his project makes a comment
something like 75,000 lines of M code get converted to
1.2 million lines of C code.  Spagetti!

Kevin




-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Hardhats-members mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to