In MIPS/risc-v assembly, write an assembly language version of the following code segment. Assume the base address of A
Posted: Fri May 20, 2022 5:03 pm
In MIPS/risc-v assembly, write an assembly language version of the following code segment. Assume the base address of A and B are in $t2 and $t3 respectively, and m, n, i, j are in $14, $t5 $to, and $t7 respectively. Assume 0 =< m, n < 10 Write the code in the natural order based on the C code. Use temporaries, starting with t1, to preserve any values that aren't explicitly overwritten by the code. Note that are used instead of brackets for array indices since brackets are interpreted by canvas as answer holders. int A|10| B|10, m, n, i,j if (m == nifi = Alm, j = i; } else {j = Bln, i = i; } Instruction1: 选择 选择 选择 选 选择 Instruction2: : 选择 选择 选择) jmp bne Instruction2a 选择 选择 选择 bgt branch Instruction3. : 选择 选择 选择 } 1 选择 Instruction: 选择 选择 Instructions: 选择 选择 选择 选择 选择 | Instruction: 选择 选择 v 选择 选择 Instructionba: 选择 选择 选择 选 》 选择) Instruction: 选择 选择 } 选择 Instruction8: (18] 选择 选择 Instruction9: Exit