[complement-svn] SF.net SVN: complement: [1608] trunk/complement/explore/inquiry/shades
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-07-12 07:26:46
|
Revision: 1608 http://svn.sourceforge.net/complement/?rev=1608&view=rev Author: complement Date: 2007-07-12 00:26:45 -0700 (Thu, 12 Jul 2007) Log Message: ----------- in-loop declaration influence only position on stack, but not more Added Paths: ----------- trunk/complement/explore/inquiry/shades/in-loop-decl/ trunk/complement/explore/inquiry/shades/in-loop-decl/test.c trunk/complement/explore/inquiry/shades/in-loop-decl/test.s Added: trunk/complement/explore/inquiry/shades/in-loop-decl/test.c =================================================================== --- trunk/complement/explore/inquiry/shades/in-loop-decl/test.c (rev 0) +++ trunk/complement/explore/inquiry/shades/in-loop-decl/test.c 2007-07-12 07:26:45 UTC (rev 1608) @@ -0,0 +1,20 @@ +int q( int b ) +{ + int a; + int i = 0; + while ( i < 10 ) { + a = b; + ++i; + } + return 0; +} + +int qq( int b ) +{ + int i = 0; + while ( i < 10 ) { + int a = b; + ++i; + } + return 0; +} Added: trunk/complement/explore/inquiry/shades/in-loop-decl/test.s =================================================================== --- trunk/complement/explore/inquiry/shades/in-loop-decl/test.s (rev 0) +++ trunk/complement/explore/inquiry/shades/in-loop-decl/test.s 2007-07-12 07:26:45 UTC (rev 1608) @@ -0,0 +1,42 @@ + .file "test.c" + .text +.globl q + .type q, @function +q: + pushl %ebp + movl %esp, %ebp + subl $16, %esp + movl $0, -4(%ebp) + jmp .L2 +.L3: + movl 8(%ebp), %eax + movl %eax, -8(%ebp) + incl -4(%ebp) +.L2: + cmpl $9, -4(%ebp) + jle .L3 + movl $0, %eax + leave + ret + .size q, .-q +.globl qq + .type qq, @function +qq: + pushl %ebp + movl %esp, %ebp + subl $16, %esp + movl $0, -8(%ebp) + jmp .L7 +.L8: + movl 8(%ebp), %eax + movl %eax, -4(%ebp) + incl -8(%ebp) +.L7: + cmpl $9, -8(%ebp) + jle .L8 + movl $0, %eax + leave + ret + .size qq, .-qq + .ident "GCC: (GNU) 4.1.1" + .section .note.GNU-stack,"",@progbits This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |