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 将堆栈框架大小加到堆栈指针来移动堆栈指针即可。
mwarn-framesize=framesize and -mwarn-dynamicstack: These options cause a compile-time check whether a function exceeds a given stack frame size or uses dynamically sized stack frames.
mwarn-framesize=framesize和 -mwarn-dynamicstack:这些选项会引起在编译时检查函数是否超过给定的堆栈帧(stack frame)大小或使用动态调整的堆栈帧。
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).
您可能会奇怪为什么在开始参数大小计算时要检查方法是否是静态的,如果是静态的,将堆栈帧槽初始化为零(不是静态正好相反)。
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.
最困难的部分是确定堆栈帧不同部分的不同偏移量,了解每个部分应该放到哪里,以及大小应该是多少。
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.
最困难的部分是确定堆栈帧不同部分的不同偏移量,了解每个部分应该放到哪里,以及大小应该是多少。
应用推荐