[quote author=huntz link=board=9;threadid=9944;start=0#msg94731 date=1119481585]
I still think it will inc, but i can be wrong, if your using gcc just complie with gcc with -S option to get the assembly output and see for yourselfs.
[/quote]
Thanks for your suggestion! I tried it, and the resulting assembly code was the same. Following is the ASM code (the C-source code file that was used to create the ASM had 10 instances of incrementing):
Code:.file"test1.c" .text .globl main .typemain, @function main: .LFB3: pushq%rbp .LCFI0: movq%rsp, %rbp .LCFI1: movl$0, -4(%rbp) leaq-4(%rbp), %rax incl(%rax) leaq-4(%rbp), %rax incl(%rax) leaq-4(%rbp), %rax incl(%rax) leaq-4(%rbp), %rax incl(%rax) leaq-4(%rbp), %rax incl(%rax) leaq-4(%rbp), %rax incl(%rax) leaq-4(%rbp), %rax incl(%rax) leaq-4(%rbp), %rax incl(%rax) leaq-4(%rbp), %rax incl(%rax) leaq-4(%rbp), %rax incl(%rax) leave ret .LFE3: .sizemain, .-main .section.eh_frame,"a",@progbits .Lframe1: .long.LECIE1-.LSCIE1 .LSCIE1: .long0x0 .byte0x1 .string"" .uleb128 0x1 .sleb128 -8 .byte0x10 .byte0xc .uleb128 0x7 .uleb128 0x8 .byte0x90 .uleb128 0x1 .align 8 .LECIE1: .LSFDE1: .long.LEFDE1-.LASFDE1 .LASFDE1: .long.LASFDE1-.Lframe1 .quad.LFB3 .quad.LFE3-.LFB3 .byte0x4 .long.LCFI0-.LFB3 .byte0xe .uleb128 0x10 .byte0x86 .uleb128 0x2 .byte0x4 .long.LCFI1-.LCFI0 .byte0xd .uleb128 0x6 .align 8 .LEFDE1: .section.note.GNU-stack,"",@progbits .ident"GCC: (GNU) 3.3.5 (Debian 1:3.3.5-8ubuntu2)"
Bookmarks