Question: Exercise 2.34 The table below contains ARM assembly code. In the following problems, you will translate ARM assembly code to MIPS. a. MOV r0, #10
Exercise 2.34 The table below contains ARM assembly code. In the following problems, you will translate ARM assembly code to MIPS.
a. MOV r0, #10 ;init loop counter to 10 LOOP: ADD r0, r1 ;add r1 to r0 SUBS r0, 1 ;decrement counter BNE LOOP ;if Z=0 repeat loop
b. ROR r1, r2, #4 ;r1 = r23:0 concatenated with r231:4 2.34.1 [5] <2.16> For the table above, translate this ARM assembly code to MIPS assembly code. Assume that ARM registers r0, r1, and r2 hold the same values as MIPS registers $s0, $s1, and $s2, respectively. Use MIPS temporary registers
($t0, etc.) where necessary.
2.34.2 [5] <2.16> For the ARM assembly instructions in the table above, show the bit fi elds that represent the ARM instructions.
The table below contains MIPS assembly code. In the following problems, you will translate MIPS assembly code to ARM.
a. slt $t0, $s0, $s1 blt $t0, $0, FARAWAY
b. add $s0, $s1, $s2 2.34.3 [5] <2.16> For the table above, fi nd the ARM assembly code that corresponds to the sequence of MIPS assembly code.
2.34.4 [5] <2.16> Show the bit fi elds that represent the ARM assembly code.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
