当前位置:网站首页>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汇编代码:
边栏推荐
- Complete steps for a complete Oracle uninstall
- [the path of system analyst] Chapter 6: Double inventory demand engineering (comprehensive knowledge concept)
- Chinese translation of IMA Lazarus' the new giant, the goddess of Liberty
- 好好思考
- Opencv learning (I) -- environment building
- Technical practice and development trend of video conference all in one machine
- QT: parsing JSON
- 【系统分析师之路】第六章 复盘需求工程(综合知识概念)
- 看完这篇 教你玩转渗透测试靶机Vulnhub——DriftingBlues-7
- 有关计网的五种类型题
猜你喜欢
【文件包含漏洞-04】经典面试题:已知某网站仅存在本地文件包含漏洞时,如何GetShell?
1-7Vmware中的快照与克隆
单片机进阶---PCB开发之照葫芦画瓢(二)
A five-year technical Er, based on the real experience of these years, gives some suggestions to the fresh students
【观察】ObjectScale:重新定义下一代对象存储,戴尔科技的重构与创新
中国信通院沈滢:字体开源协议——OFL V1.1介绍及合规要点分析
Use of Siemens plcs7-200 (I) -- Introduction to development environment and configuration software
金仓KFS数据集中场景(多对一)部署
报名开启|飞桨黑客马拉松第三期如约而至,久等啦
Opencv learning (II) -- installing opencv on raspberry pie
随机推荐
[the path of system analyst] Chapter 6: Double inventory demand engineering (comprehensive knowledge concept)
Five types of questions about network planning
Android:kotlin中Gson与JSON的泛型映射解析
Opencv learning (II) -- installing opencv on raspberry pie
報名開啟|飛槳黑客馬拉松第三期如約而至,久等啦
一文了解Prometheus
Dependent properties, dependent additional properties, and type conversions
NuxtJS实战案例
2022年PMP项目管理考试敏捷知识点(2)
Checking whether the double value is an integer - Swift - checking if a double value is an integer - swift
[today in history] June 24: Netease was established; The first consumer electronics exhibition was held; The first webcast in the world
Android之Kotlin语法详解与使用
Nuxtjs actual combat case
学会自学【学会学习本身,比学什么都重要】
Houdini graphic notes: could not create OpenCL device of type (houdini_ocl_devicetype) problem solving
性能之网络篇
Is it safe to open a securities account in changtou school by mobile phone?
keep-alive
MCU development -- face recognition application based on esp32-cam
金仓数据库 KingbaseES 插件identity_pwdexp