previous | start | next

Compiler Alternative Code for call to sum

    subl  $24,%esp         ;  allocate space for main local variables
                              AND parameters to sum
    ...                    ;  code before call to sum not shown
    movl -12(%ebp),4(%esp) ;  movl b instead of push b       
    movl -16(%ebp),(%esp)  ;  movl a instead of push a       
    call  sum              ;  sum(a,b)
    movl  %eax,-8(%ebp)    ;  ans = return value of sum(a,b)


previous | start | next