Then you restore the stack frame and return.
之后再恢复堆栈框架并返回。
The prologue sets up the stack frame for the function.
序言为函数设置堆栈框架。
The stack frame is destroyed when the function returns.
一旦函数返回了值,那么该元素就会被销毁。
The stack frame is destroyed when the function returns.
当函数返回时的堆栈帧被破坏。
For right now, just know that it sets up the stack frame.
就目前而言,只需知道它将设置堆栈框架就可以了。
LR_OFFSET is the offset into the stack frame of the return address.
LR_OFFSET是返回地址的堆栈框架的偏移量。
The first part of the stack frame is the non-volatile register save area.
堆栈帧的第一个部分是非易失性寄存器保存区。
You can construct the object on the heap or on the stack frame of a function.
可以在堆或函数的堆栈帧上构造对象。
If the stack frame is active, this address is the next instruction to execute.
如果堆栈帧处于活动状态,则此地址是要执行的下一条指令。
It displays the stack frame for the suspended threads for each target you're debugging.
它可以显示每个调试目标中挂起线程的堆栈框架。
A yellow arrow identifies the stack frame where the execution pointer is currently located.
执行指标目前所在的堆叠框架位置会以黄色箭头识别。
The computer refers to this point as the return address and keeps track of it in the stack frame.
计算机引用这一点作为返回地址,会在堆栈框架中跟踪它。
The final item in the stack frame is a pointer to the previous stack frame, often called the back pointer.
堆栈帧中的最后一个条目是一个指向前一堆栈帧的指针,通常被称为后向指针(back pointer)。
You load register 3 with the return value and perform the function epilogue to restore the stack frame and return.
需要用返回值加载寄存器3并执行函数尾声(epilogue)来恢复堆栈框架并返回。
If the stack frame is not active, this address is the next instruction to execute when the stack frame is reactivated.
如果堆栈帧未处于活动状态,则此地址是在重新激活堆栈帧时要执行的下一条指令。
So you simply need to move the stack pointer by adding the stack frame size to the stack pointer using ai $sp, $sp, FRAME_SIZE.
所以您只需通过使用ai $sp, $sp, FRAME_SIZE 将堆栈框架大小加到堆栈指针来移动堆栈指针即可。
If this stack frame is not active, the offset is the address of the next instruction to be executed when the stack frame is reactivated.
如果此堆栈帧处于非活动状态,则该偏移量将是在重新激活该堆栈帧后要执行的下一条指令的地址。
In practice this is easy; just don't write code that does low-level manipulations of the stack frame or makes assumptions about the stack layout.
这在实践上是很容易的;只要不编写对堆栈桢执行低级操作或对堆栈的布局作假设的代码就行了。
However, since the base case doesn't call any other functions, you don't need to load the link register from the stack frame — the value is still there.
但由于基线条件并不调用任何其他函数,所以无需从堆栈框架加载链接寄存器——值还在原处。
The epilogue will be discussed in the analysis of the factorial code, but it basically just takes down the stack frame and returns to the previous function.
该段代码的尾声(epilogue)将在分析factorial 代码时再作讨论,但总的来说,它的作用是结束堆栈框架并返回到先前的函数。
The most difficult part is determining the different offsets of the different parts of the stack frame, knowing where each piece should go, and what size it should be.
最困难的部分是确定堆栈帧不同部分的不同偏移量,了解每个部分应该放到哪里,以及大小应该是多少。
Functions create the stack frame during the beginning of the function (called the function prologue) and tear it down at the end of a function (called the function epilogue).
函数在函数开始过程中(称为函数序言(function prologue))创建堆栈帧,并在函数结束时(称为函数尾声(functionepilogue))销毁它。
You might wonder why I check whether the method is static at the start of my parameter size calculation, then initialize the stack frame slot to zero if it is (as opposed to one if it is not).
您可能会奇怪为什么在开始参数大小计算时要检查方法是否是静态的,如果是静态的,将堆栈帧槽初始化为零(不是静态正好相反)。
Next, the current stack frame pointer is stored as the back pointer for the next stack frame, even though you haven't established the stack frame yet (this is done through negative offsets).
接下来,当前堆栈框架指针会被存储为指向下一个堆栈框架的后向指针,虽然尚未建立堆栈框架(这是通过负的偏移量实现的)。
Notice that since there is nothing left to do in the function, the actual stack frame for the function is not needed either.
注意,由于在函数中不再做任何事情,那个函数的实际的栈结构也就不需要了。
Each stack frame holds a pointer to the previous stack frame (called the back chain pointer), as well as a space for return addresses for when it calls other functions.
每个堆栈框架都有一个指向前一个堆栈框架的指针(称为回链指针),还有一个当它调用其他函数时用于存放返回地址的空间。
Therefore, before using a non-volatile register in a function, its value must be saved in the function's stack frame, and then restored before the function returns.
因此,在函数中使用非易失性寄存器之前,它的值必须保存到该函数的堆栈帧中,然后在函数返回之前恢复。
References to variables within an expression can then be statically bound to a particular slot in either the local stack frame or the list of global variables.
然后表达式中对变量的引用可以静态绑定到本地堆栈框架或一列全局变量的特定槽上。
References to variables within an expression can then be statically bound to a particular slot in either the local stack frame or the list of global variables.
然后表达式中对变量的引用可以静态绑定到本地堆栈框架或一列全局变量的特定槽上。
应用推荐