Question: The following problems deal with translating from MIPS to C. Assume that the variables f, g, h, i, and j are assigned to registers $s0,
The following problems deal with translating from MIPS to C. Assume that the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively. Assume that the base address of the arrays A and B are in registers $s6 and $s7, respectively.
For each MIPS instruction, show the value of the opcode (OP), source register (RS), and target register (RT) fields. For the I-type instructions, show the value of the immediate field, and for the R-type instructions, show the value of the destination register (RD) field.
b. sub $50, $50, $sl sub $50, $50, $s3 add $50, $50, $sl addi $t0, $56, 4 add $t1, $s6, $0 SW $tl, 0($t0) lw $t0, 0($t0) add $s0. $tl, $to
Step by Step Solution
3.32 Rating (170 Votes )
There are 3 Steps involved in it
MIPS Instruction OP RS RT RD Immediate sub s0 s0 s3 000000 1... View full answer
Get step-by-step solutions from verified subject matter experts
