gcc -S编译出来的汇编语言怎么看啊
使用gcc -S编译出来的东西像下面这样
跟以前学过的8086的汇编语言好像不太一样啊
在网上查找了一下,说这好像是gcc内嵌的at&t格式的汇编语言
而关于gcc内嵌汇编语言的说明,网上也就是那么一篇文章,
被到处拷贝,而且说明还不全
比如下面的subl, leal指令的说明都没有
哪里有gcc内嵌汇编语言指令说明的资料啊
linux系统的man上有吗?
test.c
1 #include "stdio.h"
2 main(){
3 int i = 2;
4 int j = (++i) + (++i);
5 printf("%d\n", j);
6 }
test.s
1 .file "test.c"
2 .section .rodata
3 .LC0:
4 .string "%d\n"
5 .text
6 .globl main
7 .type main,@function
8 main:
9 pushl %ebp
10 movl %esp, %ebp
11 subl $8, %esp
12 andl $-16, %esp
13 movl $0, %eax
14 subl %eax, %esp
15 movl $2, -4(%ebp)
16 leal -4(%ebp), %eax
17 incl (%eax)
18 leal -4(%ebp), %eax
19 incl (%eax)
20 movl -4(%ebp), %eax
21 addl -4(%ebp), %eax
22 movl %eax, -8(%ebp)
23 subl $8, %esp
24 pushl -8(%ebp)
25 pushl $.LC0
26 call printf
27 addl $16, %esp
28 leave
29 ret
30 .Lfe1:
31 .size main,.Lfe1-main
32 .section .note.GNU-stack,"",@progbits
33 .ident "GCC: (GNU) 3.2.3 20030502 (Red Hat Linux 3.2.3-52)"
|