[gmx-users] benchmarks

Andrew Shewmaker shewa at inel.gov
Tue Mar 11 21:30:44 CET 2003


On Tue, 11 Mar 2003 12:11:15 -0800
Erik Lindahl <lindahl at stanford.edu> wrote:

> What you could do already now is to write a small C subroutine in a 
> separate program with 2-3 arguments, e.g.:
> 
> void myroutine(float *f, float *g, float *h) {
> 	*f = *g + *h;
> }
> 
> and then create assembly output in 64 bit with
> 
> gcc {some flags} -S file.c
> 
> and send me the resulting "file.s". This is unfortunately in GNU 
> syntax, so it's probably not going to solve it immediately, but it 
> might provide a clue.

Alright, I compiled it with no flags and with -Os.

file.s with no additional flags:

        .file   "file.c"
        .text
        .align 2
.globl myroutine
        .type   myroutine, at function
myroutine:
.LFB1:
        pushq   %rbp
.LCFI0:
        movq    %rsp, %rbp
.LCFI1:
        movq    %rdi, -8(%rbp)
        movq    %rsi, -16(%rbp)
        movq    %rdx, -24(%rbp)
        movq    -8(%rbp), %rcx
        movq    -16(%rbp), %rax
        movq    -24(%rbp), %rdx
        movss   (%rax), %xmm0
        addss   (%rdx), %xmm0
        movss   %xmm0, (%rcx)
        leave
        ret
.LFE1:
.Lfe1:
        .size   myroutine,.Lfe1-myroutine
        .section        .eh_frame,"aw", at progbits
.Lframe1:
        .long   .LECIE1-.LSCIE1
.LSCIE1:
        .long   0x0
        .byte   0x1
        .string ""
        .uleb128 0x1
        .sleb128 -8
        .byte   0x10
        .byte   0xc
        .uleb128 0x7
        .uleb128 0x8
        .byte   0x90
        .uleb128 0x1
        .align 8
.LECIE1:
.LSFDE1:
        .long   .LEFDE1-.LASFDE1
.LASFDE1:
        .long   .LASFDE1-.Lframe1
        .quad   .LFB1
        .quad   .LFE1-.LFB1
        .byte   0x4
        .long   .LCFI0-.LFB1
        .byte   0xe
        .uleb128 0x10
        .byte   0x86
        .uleb128 0x2
        .byte   0x4
        .long   .LCFI1-.LCFI0
        .byte   0xd
        .uleb128 0x6
        .align 8
.LEFDE1:
        .ident  "GCC: (GNU) 3.2"



file.s with -Os:

        .file   "file.c"
        .text
        .align 2
.globl myroutine
        .type   myroutine, at function
myroutine:
.LFB1:
        movss   (%rdx), %xmm0
        addss   (%rsi), %xmm0
        movss   %xmm0, (%rdi)
        ret
.LFE1:
.Lfe1:
        .size   myroutine,.Lfe1-myroutine
        .section        .eh_frame,"aw", at progbits
.Lframe1:
        .long   .LECIE1-.LSCIE1
.LSCIE1:
        .long   0x0
        .byte   0x1
        .string ""
        .uleb128 0x1
        .sleb128 -8
        .byte   0x10
        .byte   0xc
        .uleb128 0x7
        .uleb128 0x8
        .byte   0x90
        .uleb128 0x1
        .align 8
.LECIE1:
.LSFDE1:
        .long   .LEFDE1-.LASFDE1
.LASFDE1:
        .long   .LASFDE1-.Lframe1
        .quad   .LFB1
        .quad   .LFE1-.LFB1
        .align 8
.LEFDE1:
        .ident  "GCC: (GNU) 3.2"


Thanks,

Andrew

-- 
Andrew Shewmaker
Associate Engineer
Phone:  208.526.1415
Fax:  208.526.4017

Idaho National Engineering and Environmental Laboratory
2525 Fremont Ave.
Idaho Falls, ID 83415-3605



More information about the gromacs.org_gmx-users mailing list