找回密码
 注册
搜索
查看: 619|回复: 2

[讨论] 关于函数调用的问题!

[复制链接]
发表于 2007-12-25 17:18:42 | 显示全部楼层 |阅读模式
请问各位大侠,在一个没有参数传递的函数调用中,在进入函数入口点之前,堆栈里应该只有返回地址吧?
另外,在参数传递过程中,编译器如何知道有几个参数呢?不定参数的函数调用又是怎么编译呢?
多谢!
发表于 2008-1-31 13:13:58 | 显示全部楼层
不清楚,关注中.
点评回复

使用道具 举报

发表于 2008-2-5 00:00:21 | 显示全部楼层
1. In fact, armcc and tcc don't store return address in stack. Usually the return address is stored in LR. Of course you can store it in anywhere you like when you write assemble language.
2. You can refer to ARM-THUMB Procedure Call Standard. This book is in your ADS1.2/PDF/specs folder, with name ATPCS.pdf.
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-11-25 21:20 , Processed in 0.045393 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表