clang -S
compiles the following source:
int main {
return 0;
} // literally nothing but this main function
to this:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movl $0, -4(%rbp) # what is this?
popq %rbp
retq
# extracted out directives...
I cannot understand why movl $0, -4(%rbp)
exists. There is no local variables at all.
My clang version: Apple LLVM version 9.0.0 (clang-900.0.39.2)