Can anyone explain to me the assembly generated by GCC of the following C++ codes? espeically, the meaning of setg and test in the codes. thx!
.cpp codes:
1 /*for loop*/
2 int main()
3 {
4 int floop_id;
5 for(floop_id=100;floop_id>=1;floop_id--)
6 {}
7 return 0;
8 }
assembly codes:
3 push %ebp
3 mov %esp, %ebp
3 sub $0x10,%esp
5 movl $0x64,-0x4(%ebp)
5 jmp 8048457<main+0x13>
5 subl $0x1,-0x4(%esp)
5 cmpl $0x0,-0x4(%esp)
5 setg %al
5 test %al, %al
7 mov $0x0,%eax
8 leave
8 ret