当前位置:网站首页>What are the functions of arm64 assembly that need attention?
What are the functions of arm64 assembly that need attention?
2022-06-25 11:06:00 【Hua Weiyun】
1. What is the function call convention ?
ARM64 It uses ATPCS(ARM-Thumb Procedure Call Standard/ARM-Thumb Procedure call standard ) Function calling convention for .
2. What instructions do functions need to use ?
B: Jump unconditionally , It's usually inside a function if、switch The jump of conditional judgment
Bl: Jump with function return value , It's usually used to call other functions .RET: Subroutines return instructions , The return address is saved in... By default X30 register (LR Link Register )
LR: Save the next instruction that needs to be executed after the end of the subroutine
PC: Represents the address of the currently executed instruction .
3. How to store and pass the parameters of a function ?
3.1. Usually, the parameters of a function are stored in X0-X7(32 Bitwise is W0-W7) this 8 A register , If the function parameter exceeds 8 individual , Then you need to use stack storage to store parameters .
3.2. If the function parameter is less than 8 If there are two parameters, pass the parameters from left to right in turn , If more than 8 Then the stack is loaded from right to left .
3.3 Function 8 Parameters and 9 The details of each parameter ( However, in the development process, the parameters exceed 8 There are relatively few cases , So in the reverse process, this excess 8 The number of parameters will be less )
3.3.1 Function with eight arguments , Use register directly W0-W7 Express
Source code :
ARM64 Assembly code :
边栏推荐
- 中國信通院沈瀅:字體開源協議——OFL V1.1介紹及合規要點分析
- 手机炒股安全吗?
- MySQL synchronous data configuration and shell script implementation
- 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
- Nuxtjs actual combat case
- June 24, 2022: golang multiple choice question, what does the following golang code output? A:1; B:3; C:4; D: Compilation failed. package main import ( “fmt“ ) func mai
- Garbage collection mechanism
- COSCon'22 讲师征集令
- Compilation of learning from Wang Shuang (1)
猜你喜欢

Kotlin arrays and collections (1) {create arrays, use arrays, use for in loops to traverse arrays, use array indexes, and multi-dimensional arrays}

软件测试 避免“试用期被辞退“指南,看这一篇就够了
![[file inclusion vulnerability-04] classic interview question: how to getshell when a website is known to have only local file inclusion vulnerability?](/img/28/ab02d38bde47053b155e0545b47039.png)
[file inclusion vulnerability-04] classic interview question: how to getshell when a website is known to have only local file inclusion vulnerability?

Detailed explanation of Android interview notes handler

Software testing to avoid being dismissed during the probation period

How to start the phpstudy server
![[observation] objectscale: redefining the next generation of object storage, reconstruction and innovation of Dell Technology](/img/82/8cac87231e51698ab17f1274b3a0bd.jpg)
[observation] objectscale: redefining the next generation of object storage, reconstruction and innovation of Dell Technology

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

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

Network protocol learning -- lldp protocol learning
随机推荐
Advanced single chip microcomputer -- development of PCB (2)
戴尔科技演绎“快”字诀,玩转CI/CD
Array structure collation
GaussDB 集群维护案例集-sql执行慢
软件测试 避免“试用期被辞退“指南,看这一篇就够了
A five-year technical Er, based on the real experience of these years, gives some suggestions to the fresh students
Handler asynchronous message processing
Is it safe to open an account with Guangzhou securities by mobile phone?
Continuous delivery jenkinsfile syntax
Kotlin arrays and collections (1) {create arrays, use arrays, use for in loops to traverse arrays, use array indexes, and multi-dimensional arrays}
OpenCV学习(一)---环境搭建
Sign up to open the third session of the "flying oar hacker marathon". It's been a long time
性能之文件系统篇
【观察】ObjectScale:重新定义下一代对象存储,戴尔科技的重构与创新
Opencv learning (I) -- environment building
FPGA displays characters and pictures based on VGA
指南针在上面开股票账户安全吗?
c盘使用100%清理方法
一文了解Prometheus
TASK03|概率论