1 Star 0 Fork 0

20145203 / the forth week

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
swap_add.s 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
20145203 提交于 2016-10-16 23:00 . new file
.file "swap_add.c"
.text
.globl swap_add
.type swap_add, @function
swap_add:
.LFB0:
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp
.cfi_def_cfa_register 5
subl $16, %esp
movl 8(%ebp), %eax
movl (%eax), %eax
movl %eax, -8(%ebp)
movl 12(%ebp), %eax
movl (%eax), %eax
movl %eax, -4(%ebp)
movl 8(%ebp), %eax
movl -4(%ebp), %edx
movl %edx, (%eax)
movl 12(%ebp), %eax
movl -8(%ebp), %edx
movl %edx, (%eax)
movl -8(%ebp), %edx
movl -4(%ebp), %eax
addl %edx, %eax
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
.LFE0:
.size swap_add, .-swap_add
.globl caller
.type caller, @function
caller:
.LFB1:
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp
.cfi_def_cfa_register 5
subl $40, %esp
movl %gs:20, %eax
movl %eax, -12(%ebp)
xorl %eax, %eax
movl $534, -28(%ebp)
movl $1057, -24(%ebp)
leal -24(%ebp), %eax
pushl %eax
leal -28(%ebp), %eax
pushl %eax
call swap_add
addl $8, %esp
movl %eax, -20(%ebp)
movl -28(%ebp), %edx
movl -24(%ebp), %eax
subl %eax, %edx
movl %edx, %eax
movl %eax, -16(%ebp)
movl -20(%ebp), %eax
imull -16(%ebp), %eax
movl -12(%ebp), %ecx
xorl %gs:20, %ecx
je .L5
call __stack_chk_fail
.L5:
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
.LFE1:
.size caller, .-caller
.ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609"
.section .note.GNU-stack,"",@progbits
C
1
https://gitee.com/gzsgzsgzs/the-forth-week.git
git@gitee.com:gzsgzsgzs/the-forth-week.git
gzsgzsgzs
the-forth-week
the forth week
master

搜索帮助