Hi all

I was trying to compile the following code with gcc 4.9.2 on Ubuntu
14.04 x86_64 platform:

/* File a.cpp */
#include <stdio.h>
int main (int argc, const char *argv[])
{
  printf("Hello World!\n");
  return 0;
}


Compilation commands are:
g++-4.9.2 -std=c++11 -g -O0 -fno-builtin -m32 a.cpp

I was trying to analyze the assembly generated by using command:
objdump  -d   a.out

I was befuddled by the following 3 assembly instructions (generated
right in the beginning of 'main' function):
   lea       0x4(%esp), %ecx
   and      0xfffffff0, %esp
   pushl   -0x4(%ecx)

I am not able to understand the purpose of these 3 instructions. Can
anyone explain me about them? I didn't observe these 3 instructions
when I compiled the same code with '-m64' switch instead of '-m32'.

Thanks
- Abhishek

Reply via email to