当前位置:网站首页>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汇编代码:
边栏推荐
- Daily 3 questions (2) - find out the lucky numbers in the array
- [today in history] June 24: Netease was established; The first consumer electronics exhibition was held; The first webcast in the world
- Is it safe to open a securities account in changtou school by mobile phone?
- Learn to learn self-study [learning to learn itself is more important than learning anything]
- Houdini graphic notes: could not create OpenCL device of type (houdini_ocl_devicetype) problem solving
- Previous string inversion topic
- 无心剑中译伊玛·拉扎罗斯《新巨人·自由女神》
- VW VH adaptation of mobile terminal
- 每日3题(2)- 找出数组中的幸运数
- Performance file system
猜你喜欢

【图像融合】基于形态学分析结合稀疏表征实现图像融合附matlab代码

Dell technology performs the "fast" formula and plays ci/cd

垃圾回收机制

報名開啟|飛槳黑客馬拉松第三期如約而至,久等啦

At 16:00 today, Mr. sunxiaoming, a researcher of the Institute of computing, Chinese Academy of Sciences, took you into the quantum world

Chinese translation of IMA Lazarus' the new giant, the goddess of Liberty

CSRF攻击

A five-year technical Er, based on the real experience of these years, gives some suggestions to the fresh students

单片机进阶---PCB开发之照葫芦画瓢(二)
![[paper reading | deep reading] line: large scale information network embedding](/img/83/a67e490603c81c1d8ad9302c922769.png)
[paper reading | deep reading] line: large scale information network embedding
随机推荐
Array structure collation
Kotlin implements a simple login page
Google Earth Engine(GEE)——evaluate實現一鍵批量下載研究區內的所有單張影像(上海市部分區域)
国信证券证券账户开户安全吗
OpenCV学习(一)---环境搭建
scrapy+scrapyd+gerapy 爬虫调度框架
Open source invites you to participate in the openssf Open Source Security Online Seminar
一文了解Prometheus
《天天数学》连载52:二月二十日
QT: parsing JSON
Get to know Prometheus
Output reading: apply what you have learned
Multiple environment variables
1-7Vmware中的快照与克隆
Kotlin arrays and collections (1) {create arrays, use arrays, use for in loops to traverse arrays, use array indexes, and multi-dimensional arrays}
Use of Siemens plcs7-200 (I) -- Introduction to development environment and configuration software
After reading this article, I will teach you to play with the penetration test target vulnhub - drivetingblues-7
Application of global route guard
Unreal Engine graphics and text notes: use VAT (vertex animation texture) to make Houdini end on Houdini special effect (ue4/ue5)
Checking whether the double value is an integer - Swift - checking if a double value is an integer - swift