Here's the ouptput on the Blade 2000 of the code Gonzalo posted.
drkir...@kestrel:[~] $ more u.s
        .file   "u.c"
        .section        ".rodata"
        .align 8
.LLC0:
        .asciz  "%d %d\n"
        .section        ".text"
        .align 4
        .global main
        .type   main, #function
        .proc   04
main:
        save    %sp, -112, %sp
        mov     1, %g1
        st      %g1, [%fp-8]
        mov     -1, %g1
        st      %g1, [%fp-4]
        mov     1, %g1
        stb     %g1, [%fp-9]
        mov     1, %g1
        stb     %g1, [%fp-10]
        ld      [%fp-8], %g2
        ld      [%fp-4], %g1
        add     %g2, %g1, %g1
        add     %fp, -9, %g2
        mov     %g2, %o0
        mov     2, %o1
        mov     %g1, %o2
        call    memset, 0
         nop
        ld      [%fp-8], %g2
        ld      [%fp-4], %g1
        add     %g2, %g1, %g1
        add     %fp, -10, %g2
        mov     %g2, %o0
        mov     2, %o1
        mov     %g1, %o2
        call    memset, 0
         nop
        ldub    [%fp-9], %g1
        sll     %g1, 24, %g1
        sra     %g1, 24, %g2
        ldub    [%fp-10], %g1
        sll     %g1, 24, %g1
        sra     %g1, 24, %g1
        sethi   %hi(.LLC0), %g3
        or      %g3, %lo(.LLC0), %o0
        mov     %g2, %o1
        mov     %g1, %o2
        call    printf, 0
         nop
        mov     0, %g1
        mov     %g1, %i0
        return  %i7+8
         nop
        .size   main, .-main
        .ident  "GCC: (GNU) 4.4.0"


2009/7/20 Gonzalo Tornaria <torna...@math.utexas.edu>

>
> On Mon, Jul 20, 2009 at 9:07 AM, David Kirkby<drkir...@gmail.com> wrote:
> >
> > How to I force gcc to output the assember like this?
>
> $ gcc -S t2.c
>
> will create t2.s. You can compile the asm (possibly modified) with
>
> $ gcc t2.s -o t2
>
> etc.
>
> Gonzalo
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to