当前位置:网站首页>Hexagon_V65_Programmers_Reference_Manual(11)
Hexagon_V65_Programmers_Reference_Manual(11)
2022-07-30 04:45:00 【weixin_38498942】
Hexagon_V65_Programmers_Reference_Manual(11)
8.软件栈
Hexagon处理器包括支持呼叫的专用寄存器和指令
子程序执行堆栈。
堆栈结构遵循标准C约定
8.1 栈结构
堆栈定义为从高地址增长到低地址。堆栈指针寄存器SP指向当前位于堆栈顶部的数据元素。
注意,Hexagon处理器支持三个专用堆栈指令:
allocframe、deallocframe和Deallocu_返回(第8.5节)。
对于堆栈指令,SP地址必须始终保持8字节对齐正常工作。
8.2 栈框架
堆栈用于存储堆栈帧,堆栈帧是存储状态的数据结构
关于程序中活动子程序的信息(即那些被调用但具有
尚未返回)。每个堆栈帧对应于程序中的一个活动子例程。
堆栈框架包含以下元素:
子程序使用的局部变量和数据
子程序调用的返回地址(从链接寄存器LR推送)
在堆栈上分配的上一个堆栈帧的地址(从帧指针寄存器FP)
帧指针寄存器FP始终包含中保存的帧指针的地址当前堆栈帧。它通过允许调试器检查堆栈在内存中,可以轻松确定调用序列、函数参数等。
注意:对于叶函数,通常不需要保存FP和LR。在这种情况下,FP包含调用函数的帧指针,而不是当前函数。
8.3 堆栈保护
Hexagon V6x处理器支持以下功能,以保护软件堆栈:
堆栈边界检查
堆叠粉碎保护
8.3.1堆栈边界检查
堆栈边界检查可防止堆栈帧被分配超过下限软件堆栈的边界。
FRAMELIMIT是一个32位控制寄存器,它存储指定为软件堆栈保留的内存区域的下限。当allocframe指令分配一个新的堆栈帧,它将SP中的新堆栈指针值与FRAMELIMIT中的堆栈绑定值。如果SP小于FRAMELIMIT,则Hexagon 处理器引发异常0x27(第7.10节)。
注意:当处理器处于用户和来宾状态时,将执行堆栈边界检查模式,但不在监视器模式下。
8.3.2 堆栈边界检查
堆栈边界检查可防止堆栈帧被分配超过下限软件堆栈的边界。
FRAMELIMIT是一个32位控制寄存器,它存储指定为软件堆栈保留的内存区域的下限。当allocframe指令分配一个新的堆栈帧,它将SP中的新堆栈指针值与FRAMELIMIT中的堆栈绑定值。如果SP小于FRAMELIMIT,则Hexagon 处理器引发异常0x27(第7.10节)。
注意:当处理器处于用户和来宾状态时,将执行堆栈边界检查模式,但不在监视器模式下。
边栏推荐
- QT(39)-vs development qt program prompts that the source file cannot be opened
- Code readability, pre-checks, comments and summaries
- Requirements design document and the changing role of the product manager
- webService interface
- Get the local IP and Request's IP
- Discourse Custom Header Links
- Small program npm package--API Promise
- Weight line segment tree + line segment tree split/merge + CF1659D
- See you in shenzhen!Cloud native to accelerate the application building special: see cloud native FinOps, SRE, high-performance computing scenario best practices
- Perspective transformation matrix of image perspective correction should be matrix (single)/findHomography with getPerspectiveTransformd difference
猜你喜欢

Compound Types--references, pointers

Learning of redis_Basic part

Perspective transformation matrix of image perspective correction should be matrix (single)/findHomography with getPerspectiveTransformd difference

Simple experiment with BGP

webService interface

Introduction to Thymeleaf

Golang eight-legged text finishing (continuous handling)

Discourse Custom Header Links

Protobuf compound data types, speaking, reading and writing
![[MRCTF2020]Hello_ misc](/img/ea/0faacf6e544b60e3459d8ace4d5f42.png)
[MRCTF2020]Hello_ misc
随机推荐
GCC Rust is approved to be included in the mainline code base, or will meet you in GCC 13
【线性表】- LeetCode力扣三道练习题详解
Naive Bayes Classification
The Azure developer news 丨 memorabilia in July
Notes on "The Law of Construction"---Chapter 10 Typical Users and Scenarios
Small program npm package--API Promise
3. Dependency configuration management
[Linear table] - Detailed explanation of three practice questions of LeetCode
file system two
Whole process scheduling - Azkaban entry and advanced
The Double Pointer Problem (Part 2)
Compound Types--references, pointers
A must see for software testers!Database knowledge MySQL query statement Daquan
error: The following untracked working tree files would be overwritten by
C. Qualification Rounds
Image stitching (registration) case based on OpenCV
A brief introduction to the SSM framework
Requirements design document and the changing role of the product manager
【 notes 】 the beauty of the software engineering - column 31 | software testing are responsible for the quality of products?
SaaS多租户数据隔离的三种解决方案