简体   繁体   English

MIPS /汇编:执行指令后如何手动查找寄存器值?

[英]MIPS/Assembly: How do I find register value by hand after an instruction is executed?

I was hoping someone could point me in the right direction. 我希望有人可以指出正确的方向。 I have an instruction to find the content of a register after an executed instruction. 我有一条指令,可以在执行一条指令后查找寄存器的内容。 The instruction: 说明:

add $s1, $s5, $t9 加$ s1,$ s5,$ t9

Register $s1 contents before the instruction: 0x00000457 在指令前注册$ s1内容:0x00000457

How would I go about doing this by hand? 我将如何手工进行?

I know the instruction converted into binary is (based on register numbers, which is probably wrong. But I tried it considering I had no values): 我知道转换为二进制的指令是(基于寄存器号,这可能是错误的。但是考虑到我没有值,我尝试了它):

0000 0010 1011 1000 1000 1000 0010 0000

But I don't really understand how to figure out what the value after that instruction would be. 但是我真的不明白如何弄清楚那条指令后的价值。

$s1 is the write-only destination for add $s1, $s5, $t9 . $s1add $s1, $s5, $t9的只写目标。 It does 确实

$s1 = $s5 + $t9

The starting value of $s1 is completely irrelevant and tells you nothing; $s1的起始值完全无关紧要,什么也没告诉您。 the instruction has no dependency on it. 该指令对此没有依赖性。

You need the values of the source operands, $s5 and $t9 . 您需要源操作数$s5$t9

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM