Compiling x86 code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, 

I am trying to follow a tutorial in which C code is compiled, for example 
void buffers_function(int a, int b, int c) {
   char buffer1[10];
   char buffer2[11];
}

void main() {
  buffers_function(1,2,3);
}
and is compiled using the following command line: 
gcc -S -o example1.s example1.c

the problem is, example1.s does not include 3 pushes of the parameters and then the call to buffers_function, but instead it includes: 
movl    $3, 8(%esp)
movl    $2, 4(%esp)
movl    $1, (%esp)
call    function

which GCC flags do I need to use in order to see the 3 pushes instead of the movl operation? 

Thanks!





----
Sent using GuerrillaMail.com
Block or report abuse: https://www.guerrillamail.com/abuse/?a=RkJ3SAUFT6Q1jw23vnkRZ1rIX80%3D







[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux