#include
//label: if (a) b = c;
int main()
{
int a = 0 , b = 1 , c = 2;
if (a) b = c;
return b;
}
| .file "6.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 $16, %esp
movl $0, -16(%ebp)
movl $1, -12(%ebp)
movl $2, -8(%ebp)
cmpl $0, -16(%ebp)
je .L2
movl -8(%ebp), %eax
movl %eax, -12(%ebp)
.L2:
movl -12(%ebp), %eax
addl $16, %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 "6.c"
.section .mdebug.abi32
.previous
.abicalls
.text
.align 2
.globl main
.ent main
.type main, @function
main:
.frame $fp,32,$31 # vars= 16, reg...
.mask 0x40000000,-8
.fmask 0x00000000,0
.set noreorder
.cpload $25
.set reorder
addiu $sp,$sp,-32
sw $fp,24($sp)
move $fp,$sp
sw $0,8($fp)
li $2,1 # 0x1
sw $2,12($fp)
li $2,2 # 0x2
sw $2,16($fp)
lw $2,8($fp)
beq $2,$0,$L2
lw $2,16($fp)
sw $2,12($fp)
$L2:
lw $2,12($fp)
move $sp,$fp
lw $fp,24($sp)
addiu $sp,$sp,32
j $31
.end main
.ident "GCC: (GNU) 3.4.5"
| .file "6.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
movl $1, %eax
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 "6.c"
.section .mdebug.abi32
.previous
.abicalls
.text
.align 2
.globl main
.ent main
.type main, @function
main:
.frame $sp,0,$31 # vars= 0, regs=...
.mask 0x00000000,0
.fmask 0x00000000,0
.set noreorder
.cpload $25
.set reorder
.set noreorder
.set nomacro
j $31
li $2,1 # 0x1
.set macro
.set reorder
.end main
.ident "GCC: (GNU) 3.4.5"
| .file "6.c"
.text
.p2align 4,,15
.globl main
.type main, @function
main:
leal 4(%esp), %ecx
andl $-16, %esp
pushl -4(%ecx)
movl $1, %eax
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 "6.c"
.section .mdebug.abi32
.previous
.abicalls
.text
.align 2
.globl main
.ent main
.type main, @function
main:
.frame $sp,0,$31 # vars= 0, regs=...
.mask 0x00000000,0
.fmask 0x00000000,0
.set noreorder
.set nomacro
j $31
li $2,1 # 0x1
.set macro
.set reorder
.end main
.ident "GCC: (GNU) 3.4.5"
|