int x=1;
int y=2;
int z=3;
turns into
movl $1, -4(%rbp)
movl $2, -8(%rbp)
movl $3, -12(%rbp)
What is the -4,-8,-12 for ? Why is it going by 4's? 4 bytes = 32 bits?
int x=1;
int y=2;
int z=3;
turns into
movl $1, -4(%rbp)
movl $2, -8(%rbp)
movl $3, -12(%rbp)
What is the -4,-8,-12 for ? Why is it going by 4's? 4 bytes = 32 bits?
-4 / -8 / -12 bytes relative to the address held in
rbp
, which is the pointer to the top of the stack (which grows downward). 4 bytes / 32 bits because that is the size ofint
on your machine.