The first three problems in this Exercise refer to the following function, given in MIPS assembly. Unfortunately,

Question:

The first three problems in this Exercise refer to the following function, given in MIPS assembly. Unfortunately, the programmer of this function has fallen prey to the pitfall of assuming that MIPS is a word-addressed machine, but in fact MIPS is byte-addressed.; int f(int *a, int n, int x); f: move $v0,$0 : ret=0 move $t0,$a0 : ptr-a add $t1,$al, $a0; &(a[n]) $t2,0b. ; void f(int a[], int n); f: move $t0,$0 ; i=0; ; n-1 ; address of a[i] : read a[i+1] : a[i]-a[i+1] ;

Note that in MIPS assembly the “;” character denotes that the remainder of the line is a comment.


Change this code to make it correct for 32-bit integers.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Computer Organization And Design The Hardware Software Interface

ISBN: 9780123747501

4th Revised Edition

Authors: David A. Patterson, John L. Hennessy

Question Posted: