这个是题目 For the following C statement, what is the corresponding MIPS assembly code? 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 $7, respectively. B[8] = A[i–j]; 然后我在网络上找的答案说 sub $t0, $s3, $s4 # $t0 = i-j sll $t0, $t0, 2 # $t0 = (i-j) * 4 lw $t1, 0($s6) # $t1 = A[0] add $t1, $t1, $t0 # $t1 = &A[i-j] <
$s6里存的是A的address吧 怎么会用lw 还是我理解错题目意思?Assume that the base address of the arrays A and B arein registers $s6 and$7,A[0]+(i-j)*4 怎么会是A[i-j]的address应该要&A[0]+$t0才对吧? 还是我观念错了?orz