Skip to content
Snippets Groups Projects
Select Git revision
  • e48924b57cd3dd2afba7122942909b21f332715f
  • 2024ws default
  • 2023ws
  • 2022ws
  • 2021ws
  • 2020ws
  • 2018ws
  • 2019ws
  • 2017ws
  • 2016ws
10 results

functions-8.s

Blame
  • functions-8.s 1.41 KiB
    	.file	"functions-8.c"
    	.section	.rodata.str1.1,"aMS",@progbits,1
    .LC0:
    	.string	"foo(): a = %d, b = %d\n"
    	.text
    	.globl	foo
    	.type	foo, @function
    foo:
    .LFB11:
    	.cfi_startproc
    	subq	$8, %rsp
    	.cfi_def_cfa_offset 16
    	addl	$1, b(%rip)
    	movl	$7, %edx
    	movl	a.2249(%rip), %esi
    	leaq	.LC0(%rip), %rdi
    	movl	$0, %eax
    	call	printf@PLT
    	addl	$1, a.2249(%rip)
    	addq	$8, %rsp
    	.cfi_def_cfa_offset 8
    	ret
    	.cfi_endproc
    .LFE11:
    	.size	foo, .-foo
    	.section	.rodata.str1.1
    .LC1:
    	.string	"main(): a = %d, b = %d\n"
    	.text
    	.globl	main
    	.type	main, @function
    main:
    .LFB12:
    	.cfi_startproc
    	subq	$8, %rsp
    	.cfi_def_cfa_offset 16
    	movl	b(%rip), %edx
    	movl	a(%rip), %esi
    	leaq	.LC1(%rip), %rdi
    	movl	$0, %eax
    	call	printf@PLT
    	call	foo
    	movl	b(%rip), %edx
    	movl	a(%rip), %esi
    	leaq	.LC1(%rip), %rdi
    	movl	$0, %eax
    	call	printf@PLT
    	movl	$12, b(%rip)
    	movl	$12, a(%rip)
    	movl	$12, %edx
    	movl	$12, %esi
    	leaq	.LC1(%rip), %rdi
    	movl	$0, %eax
    	call	printf@PLT
    	call	foo
    	movl	b(%rip), %edx
    	movl	a(%rip), %esi
    	leaq	.LC1(%rip), %rdi
    	movl	$0, %eax
    	call	printf@PLT
    	movl	$0, %eax
    	addq	$8, %rsp
    	.cfi_def_cfa_offset 8
    	ret
    	.cfi_endproc
    .LFE12:
    	.size	main, .-main
    	.data
    	.align 4
    	.type	a.2249, @object
    	.size	a.2249, 4
    a.2249:
    	.long	5
    	.globl	b
    	.align 4
    	.type	b, @object
    	.size	b, 4
    b:
    	.long	3
    	.globl	a
    	.bss
    	.align 4
    	.type	a, @object
    	.size	a, 4
    a:
    	.zero	4
    	.ident	"GCC: (Debian 6.3.0-18+deb9u1) 6.3.0 20170516"
    	.section	.note.GNU-stack,"",@progbits