Describe the implementation of the following new instruction for Y86 Seq as you did in
Homework 2. This instruction is similar to mrmovl except that it adds 4 to rB and does not have a static-displacement operand. It would be useful, for example, for iterating over an array of integers.
Syntax:
mrmovincl (rB), rA
Semantics:
r[rA] <= m[r[rB]]
r[rB] <= r[rB] + 4
Memory Layout:
| 5 | F | rA | rB |
Describe each stage using a relaxed syntax similar as shown below. The Fetch and PC Update stages are complete. List only the code that would be added for this instruction.
Fetch:
f.iCd = m[F.pc] >> 4
f.iFn = m[F.pc] & 0xf
f.rA = m[F.pc+1] >> 4
f.rB = m[F.pc+1] & 0xf
f.valP = F.pc + 2
Decode:
d.srcA = ❌
d.srcB = ❌
d.dstE = D.rB
d.dstM = ❌
d.valB = ❌
Execute:
e.aluA = 4
e.aluB = ❌
e.aluFun = ❌
e.valE = ❌
Memory:
m.valM = ❌
Write Back:
r[W.dstE] = ❌
r[W.dstM] = ❌
PC Update (pseudo stage):
w.pc = W.valP
Klicke und ziehe, um den Text zu vervollständigen.