clang -S
编译以下来源:
int main {
return 0;
} // literally nothing but this main function
到此:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movl $0, -4(%rbp) # what is this?
popq %rbp
retq
# extracted out directives...
我无法理解为什么movl $0, -4(%rbp)
存在。根本没有局部变量。
我的铿锵声版:Apple LLVM version 9.0.0 (clang-900.0.39.2)