1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #include <cstdio> int main() { int sum=10, i=5; sum=sum+i; printf("%d\n", sum); return 0; } // -O0 call ___main movl $10, 28(%esp) movl $5, 24(%esp) movl 24(%esp), %eax addl %eax, 28(%esp) movl 28(%esp), %eax movl %eax, 4(%esp) movl $LC0, (%esp) call _printf movl $0, %eax // -O2 call ___main movl $15, 4(%esp) movl $LC0, (%esp) call _printf xorl %eax, %eax |
Direct link: https://paste.plurk.com/show/1719253