当前位置:网站首页>ARM64汇编的函数有那些需要注意?
ARM64汇编的函数有那些需要注意?
2022-06-25 10:47:00 【华为云】
1.函数调用约定是什么约定?
ARM64使用的是ATPCS(ARM-Thumb Procedure Call Standard/ARM-Thumb过程调用标准)的函数调用约定。
2.函数需要用到到的指令有那些?
B:无条件跳转,一般是函数内部的if、switch条件判断的跳转
Bl:带函数返回值的跳转,一般是用于调用其他的函数。RET:子程序返回指令,返回地址默认保存在X30寄存器(LR链接寄存器)
LR:保存子程序结束后需要执行的下一条指令
PC:表示当前执行的指令的地址。
3.函数的参数怎么存储传递?
3.1. 通常情况下函数的参数存放在X0-X7(32位的为W0-W7)这8个寄存器,如果函数参数超过8个,那么就需要用到栈存储的方式来存储参数。
3.2. 函数参数如果少于8个参数的那么依次从左往右传参,如果多于8个的参数那么依次从右往左进行入栈的。
3.3 函数中8个参数和9个参数的具体情况(不过在开发过程中参数超过8个的情况是比较少的,因此在逆向过程中这种超过8个参数的情况也会比较少的)
3.3.1函数中有八个参数的,直接用寄存器W0-W7表示
源代码:
ARM64汇编代码:
边栏推荐
- 看完这篇 教你玩转渗透测试靶机Vulnhub——DriftingBlues-7
- 开源社邀请您参加OpenSSF开源安全线上研讨会
- Detailed explanation of Android interview notes handler
- 2022年PMP项目管理考试敏捷知识点(2)
- 指南针在上面开股票账户安全吗?
- New school: no fraud Economics
- Writing wechat applet with uni app
- Growth: how to think deeply and learn
- Shen Lu, China Communications Institute: police open source Protocol - ofl v1.1 Introduction and Compliance Analysis
- Android:kotlin中Gson与JSON的泛型映射解析
猜你喜欢

NETCORE performance troubleshooting

zabbix分布式系统监控

Socket communication principle
![[200 opencv routines] 210 Are there so many holes in drawing a straight line?](/img/1e/5b8245eb1c391649c7b2783c62c2b0.png)
[200 opencv routines] 210 Are there so many holes in drawing a straight line?

Nuxtjs actual combat case

中國信通院沈瀅:字體開源協議——OFL V1.1介紹及合規要點分析

Upload and modify the use of avatars

WPF prism framework

Opencv learning (II) -- installing opencv on raspberry pie
![[image fusion] image fusion based on morphological analysis and sparse representation with matlab code](/img/ae/027fc1a3ce40b35090531370022c92.png)
[image fusion] image fusion based on morphological analysis and sparse representation with matlab code
随机推荐
Unreal Engine graphics and text notes: use VAT (vertex animation texture) to make Houdini end on Houdini special effect (ue4/ue5)
Five types of questions about network planning
中國信通院沈瀅:字體開源協議——OFL V1.1介紹及合規要點分析
Previous string inversion topic
手机办理长投学堂证券开户靠谱安全吗?
keep-alive
Get to know Prometheus
A five-year technical Er, based on the real experience of these years, gives some suggestions to the fresh students
Android: generic mapping analysis of gson and JSON in kotlin
中国信通院沈滢:字体开源协议——OFL V1.1介绍及合规要点分析
16 enterprise architecture strategies
看完这篇 教你玩转渗透测试靶机Vulnhub——DriftingBlues-7
《天天数学》连载52:二月二十日
金仓数据库 KingbaseES 插件ftutilx
查询法,中断法实现USART通信
Network protocol learning -- lldp protocol learning
Handling of NPM I installation problems
ZABBIX distributed system monitoring
16 种企业架构策略
Upload and modify the use of avatars