- 3
- 0
- 约5.55千字
- 约 9页
- 2017-08-16 发布于河南
- 举报
printList((p)next)课件
The MIPS stack: recap
The stack grows downward in terms of memory addresses.
The address of the top element of the stack is stored (by convention) in the “stack pointer” register, $sp.
0($sp), 1($sp), … are “used” locations
-1($sp), -2($sp), … are “free”
MIPS does not provide “push” and “pop” instructions. Instead, they must be done explicitly by the programmer.
“push” $t0 simulated with:
sub $sp, $sp, 4 # $t0 needs 4 bytes
sw $t0, 0($sp) # write to stack
“pop” $t0 simulated with:
lw $t0, 0($sp) # read stack top
addi $sp, $sp, 4 # free 4 bytes
0x7FFFFFFF
0$sp
stack
堤惟猪盾妮矮蝗良花邪
您可能关注的文档
- PMC_项目监控课件.ppt
- Pleegzorg, een haalbaar alternatief课件.ppt
- PNEUMATECH_产品技术介绍(PHC再生式干燥机)课件.ppt
- PN_OFFSET 规划课件.ppt
- PodatkiIzdelava anketnega vpra alnika课件.ppt
- point of view课件.ppt
- politeness principle课件.ppt
- Politics in Newspapers lecture 2课件.ppt
- politics课件.ppt
- political system, education and economy of Nz课件.ppt
最近下载
- 秋八年级数学上册 第11章 数的开方双休作业一课件 华东师大版.ppt VIP
- 2026年01月26日磁县前岭矿业有限公司磁县前岭矿业有限公司前岭煤矿建设项目.pdf VIP
- 超星尔雅赏音析乐(阳光学院)章节测验答案.docx
- CMA一单一库全套落地体系资料 V2.0.docx VIP
- 高压氧临床应用中国专家共识(2026版).docx VIP
- 卧式离心泵配自吸罐的引水装置的设计要点.docx VIP
- 美国教育法律中的学生权利及其保障研究.pdf VIP
- 新版人教版九年级英语上册字帖 意大利斜体Unit2.pdf
- 建设工程质量常见多发问题防治措施汇编(轨道).docx VIP
- 《PFMEA培训教材》课件.ppt VIP
原创力文档

文档评论(0)