Paste: asm
Author: | kssreeram |
Mode: | assembly-x86 |
Date: | Thu, 24 Jun 2010 04:36:40 |
Plain Text |
.section .rdata,"dr"
literal_str :
.ascii "initing x ...\0"
.text
.def _initGlobals
.globl _initGlobals
_initGlobals: # @"clay_cwrapper_%initGlobals"
# BB#0: # %body
pushl %esi
Ltmp0:
subl $8, %esp
Ltmp1:
movl $literal_str, (%esp)
call _puts
movl $11, _clay_x
addl $8, %esp
popl %esi
ret
.def _main
.globl _main
_main: # @main
# BB#0: # %init
incl _clay_x
xorl %eax, %eax
ret
.lcomm _clay_x,4 # @clay_x
# @clay_x
.section .ctors,"w"
.align 4
.long _initGlobals
Author: | kssreeram |
Mode: | assembly-x86 |
Date: | Thu, 24 Jun 2010 04:45:13 |
Plain Text |
.file "test.cpp"
.section .rdata,"dr"
LC0:
.ascii "initing x ...\0"
.text
.globl __Z5initXv
.def __Z5initXv
__Z5initXv:
pushl %ebp
movl %esp, %ebp
subl $24, %esp
movl $LC0, (%esp)
call _puts
movl $11, %eax
leave
ret
.globl _x
.bss
.align 4
_x:
.space 4
.def ___main
.section .rdata,"dr"
LC1:
.ascii "x = %d\12\0"
.text
.globl _main
.def _main
_main:
pushl %ebp
movl %esp, %ebp
andl $-16, %esp
subl $16, %esp
call ___main
movl _x, %eax
movl %eax, 4(%esp)
movl $LC1, (%esp)
call _printf
movl $0, %eax
leave
ret
.def __Z41__static_initialization_and_destruction_0ii
__Z41__static_initialization_and_destruction_0ii:
pushl %ebp
movl %esp, %ebp
subl $8, %esp
cmpl $1, 8(%ebp)
jne L7
cmpl $65535, 12(%ebp)
jne L7
call __Z5initXv
movl %eax, _x
L7:
leave
ret
.def __GLOBAL__I__Z5initXv
__GLOBAL__I__Z5initXv:
pushl %ebp
movl %esp, %ebp
subl $24, %esp
movl $65535, 4(%esp)
movl $1, (%esp)
call __Z41__static_initialization_and_destruction_0ii
leave
ret
.section .ctors,"w"
.align 4
.long __GLOBAL__I__Z5initXv
.def _puts
.def _printf
New Annotation