#include
//label: a = foo[4];
int main()
{
int a;
int foo[5];
a = foo[4];
return a;
}
| .file "10.c"
.text
.globl main
.type main, @function
main:
leal 4(%esp), %ecx
andl $-16, %esp
pushl -4(%ecx)
pushl %ebp
movl %esp, %ebp
pushl %ecx
subl $32, %esp
movl -12(%ebp), %eax
movl %eax, -8(%ebp)
movl -8(%ebp), %eax
addl $32, %esp
popl %ecx
popl %ebp
leal -4(%ecx), %esp
ret
.size main, .-main
.ident "GCC: (GNU) 4.1.2 20080704 ...
.section .note.GNU-stack,"",@progb...
| .file 1 "10.c"
.section .mdebug.abi32
.previous
.abicalls
.text
.align 2
.globl main
.ent main
.type main, @function
main:
.frame $fp,48,$31 # vars= 32, reg...
.mask 0x40000000,-8
.fmask 0x00000000,0
.set noreorder
.cpload $25
.set reorder
addiu $sp,$sp,-48
sw $fp,40($sp)
move $fp,$sp
lw $2,32($fp)
sw $2,8($fp)
lw $2,8($fp)
move $sp,$fp
lw $fp,40($sp)
addiu $sp,$sp,48
j $31
.end main
.ident "GCC: (GNU) 3.4.5"
| .file "10.c"
.text
.globl main
.type main, @function
main:
leal 4(%esp), %ecx
andl $-16, %esp
pushl -4(%ecx)
pushl %ebp
movl %esp, %ebp
pushl %ecx
popl %ecx
popl %ebp
leal -4(%ecx), %esp
ret
.size main, .-main
.ident "GCC: (GNU) 4.1.2 20080704 ...
.section .note.GNU-stack,"",@progb...
| .file 1 "10.c"
.section .mdebug.abi32
.previous
.abicalls
.text
.align 2
.globl main
.ent main
.type main, @function
main:
.frame $sp,32,$31 # vars= 24, reg...
.mask 0x00000000,0
.fmask 0x00000000,0
.set noreorder
.cpload $25
.set reorder
addiu $sp,$sp,-32
lw $2,24($sp)
.set noreorder
.set nomacro
j $31
addiu $sp,$sp,32
.set macro
.set reorder
.end main
.ident "GCC: (GNU) 3.4.5"
| .file "10.c"
.text
.p2align 4,,15
.globl main
.type main, @function
main:
leal 4(%esp), %ecx
andl $-16, %esp
pushl -4(%ecx)
pushl %ebp
movl %esp, %ebp
pushl %ecx
popl %ecx
popl %ebp
leal -4(%ecx), %esp
ret
.size main, .-main
.ident "GCC: (GNU) 4.1.2 20080704 ...
.section .note.GNU-stack,"",@progb...
| .file 1 "10.c"
.section .mdebug.abi32
.previous
.abicalls
.text
.align 2
.globl main
.ent main
.type main, @function
main:
.frame $sp,32,$31 # vars= 24, reg...
.mask 0x00000000,0
.fmask 0x00000000,0
.set noreorder
.set nomacro
addiu $sp,$sp,-32
lw $2,24($sp)
j $31
addiu $sp,$sp,32
.set macro
.set reorder
.end main
.ident "GCC: (GNU) 3.4.5"
|