c 代码用汇编语言输出,如何从GCC的C/C+源代码中获得汇编语言输出?

g++ -g -O -Wa,-aslh horton_ex2_05.cpp >list.txt

我在Win-XP上从DOS窗口运行G+,与包含隐式强制转换的例程相反c:\gpp_code>g++ -g -O -Wa,-aslh horton_ex2_05.cpp >list.txt

horton_ex2_05.cpp: In function `int main()':

horton_ex2_05.cpp:92: warning: assignment to `int' from `double'

输出是与原始C+代码反复迭代生成的代码(C+代码在生成的ASM流中显示为注释)16:horton_ex2_05.cpp **** using std::setw;

17:horton_ex2_05.cpp ****

18:horton_ex2_05.cpp **** void disp_Time_Line (void);

19:horton_ex2_05.cpp ****

20:horton_ex2_05.cpp **** int main(void)

21:horton_ex2_05.cpp **** {

164                    %ebp 165

subl $128,%esp?GAS LISTING C:\DOCUME~1\CRAIGM~1\LOCALS~1\Temp\ccx52rCc.s166 0128 55

call ___main167 0129 89E5          .stabn 68,0,21,LM2-_main168 012b 81EC8000      LM2:168      0000169 0131 E8000000

LBB2:169      00170                    .stabn 68,0,25,LM3-_main171                    LM3:172

movl $0,-16(%ebp)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值