当前位置:网站首页>How to stack double and float in the bottom layer of C language
How to stack double and float in the bottom layer of C language
2022-06-10 20:02:00 【[email protected]】
I have been wondering why printf It can be used %f Output double and float type , Because one is 8 Byte one is 4 byte , How to correctly pop the stack ?
In the reading arm Found after assembly code :
1. Variable length parameter list must be preceded by 1 Parameters , Stack pressing starts from this parameter , And stack pressing from right to left also corresponds to this mechanism ;( Finally press the left , So for the full decrement stack ,sp The address is the antecedent parameter before the variable parameter , stay vprintf You don't need to know how many are passed before )
2. about float, Will also press 8 Bytes ,double Pressed 8 Bytes all make sense ,float Will press 4 No meaningful bytes before pressing 4 Meaningful bytes , This meaningless byte is not randomly generated after testing , Relating to the encoding of meaningful bytes , There have been 0xc0000000,0x40000000,0x0, I speculate that it is possible that float When passed as a variable parameter , The default parameter will be promoted ,float Promoted to double;( Generally, parameter transfer will not be promoted by default , Only the implicit parameter list will )
版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206101740272110.html
边栏推荐
- Batch detection of specified ports of different URLs (py script)
- This article introduces you to j.u.c's futuretask, fork/join framework and BlockingQueue
- 如何使用物联网低代码平台进行工作表管理?
- Soft deletion of data - when? How to realize it?
- flink啥时候可以支持在sql-client模式下,往yarn上提交任务可以指定applicati
- Spark ShuffleManager
- Nature Biotechnol | 李家洋/余泓团队利用平铺删除策略打破性状连锁,突破水稻产量瓶颈
- Mysql database design concept (multi table query & transaction operation)
- 高通 QC2.0 快速充电智能识别IC FP6719
- VR全景如何应用在家装中?体验真实的家装效果
猜你喜欢

在VR全景中如何添加聚合热点?内容模块如何添加?

Spark ShuffleManager

Trilogy to solve the problem of playing chess first and then

2022.05.27 (lc_647_palindrome substring)

批量检测不同url的指定端口(py脚本)

HW blue team intermediate interview reply

During the college entrance examination this year, all examination sites were in good order, and no sensitive cases affecting safety occurred

Mysql database design concept (multi table query & transaction operation)

Which school do you choose after the college entrance examination? VR panoramic campus all-round display

如何在VR全景作品中添加独立热点?
随机推荐
Solving Bob's survival problem by trilogy routine
Soft deletion of data - when? How to realize it?
高通 QC2.0 快速充电智能识别IC FP6719
长颈鹿的脖子变长其实不是因为吃高处的树叶?科学家在1700万年前的化石中找到答案
After the college entrance examination, VR panoramic tour will show you the beautiful scenery of the scenic spot
During the college entrance examination this year, all examination sites were in good order, and no sensitive cases affecting safety occurred
frp reverse proxy
【6.4-6.10】博客精彩回顾
推开混合云市场大门,Lenovo xCloud的破局之道
刷脸认证如何实现人脸又快又准完成校验?
MySql的MyISAM引擎切换InnoDB时报错Row size too large (> 8126)解决
Summary of "performance test" of special test
Trilogy to solve the problem of playing chess first and then
One article explains in detail the exploration and practice of eventmesh landing on Huawei cloud
批量检测不同url的指定端口(py脚本)
HW blue team intermediate interview reply
高考后选择哪所学校?VR全景校园全方位展示
I drew several exquisite charts with plotly, which turned out to be beautiful!!
flink啥时候可以支持在sql-client模式下,往yarn上提交任务可以指定applicati
DDD landing practice repeat record of theoretical training & Event storm