免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3523 | 回复: 0
打印 上一主题 下一主题

hello.S文件在gcc-1.40下产生的 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-01-24 19:21 |只看该作者 |倒序浏览
本帖最后由 chenghao0511 于 2015-01-24 22:04 编辑

.file        "hello.c"
gcc_compiled.:
.text
LC0:
        .ascii "Hello, world!\12\0"
        .align 2
.globl _main
_main:
        pushl %ebp
        movl %esp,%ebp
        pushl $LC0
        call _printf
        xorl %eax,%eax
        jmp L1
        .align 2
L1:
        leave
        ret


下面是rtl语言表示:

  1. ;; Function main

  2. (note 2 0 3 "" NOTE_INSN_DELETED)

  3. (note 3 2 4 "" NOTE_INSN_FUNCTION_BEG)

  4. (note 4 3 6 "" NOTE_INSN_DELETED)

  5. (insn 6 4 7 (set (mem:SI (pre_dec:SI (reg:SI 7)))
  6.        (symbol_ref:SI ("*LC0"))) -1 (nil)
  7.    (nil))

  8. (call_insn 7 6 9 (set (reg:SI 0)
  9.        (call (mem:QI (symbol_ref/v:SI ("printf")))
  10.            (const_int 4))) -1 (nil)
  11.    (nil))

  12. (insn 9 7 10 (set (reg/i:SI 0)
  13.        (const_int 0)) -1 (nil)
  14.    (nil))

  15. (insn 10 9 11 (use (reg/i:SI 0)) -1 (nil)
  16.    (nil))

  17. (jump_insn 11 10 12 (set (pc)
  18.        (label_ref 15)) -1 (nil)
  19.    (nil))

  20. (barrier 12 11 13)

  21. (note 13 12 15 "" NOTE_INSN_FUNCTION_END)

  22. (code_label 15 13 0 1)
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP