Page 1 of 1

3. DAXPY. Given the MIPS code below, assume X and Y are vectors that are 64 bits wide. Starting addresses of X and Y are

Posted: Sun May 15, 2022 10:05 am
by answerhappygod
3 Daxpy Given The Mips Code Below Assume X And Y Are Vectors That Are 64 Bits Wide Starting Addresses Of X And Y Are 1
3 Daxpy Given The Mips Code Below Assume X And Y Are Vectors That Are 64 Bits Wide Starting Addresses Of X And Y Are 1 (54.88 KiB) Viewed 48 times
3. DAXPY. Given the MIPS code below, assume X and Y are vectors that are 64 bits wide. Starting addresses of X and Y are in $s0 and $51. How long is each vector? How many total instructions are executed? If $50 = 20 and $51 = 1050, what are the memory addresses for x[5] and y[10]? Where are these addresses located? loop: 1.d $80, a ($sp) addiu $t0,$s0, #280 1.d $2,0 ($80) mul.d $£2, $£2, $f0 1.d $14,0 ($81) I add.d $4, $f4, $f2 s.d $4,0 ($81) addiu $80, $80, #8 addiu $51,$s1, #8 subu $t1,$t0,$s0 bne $t1,$zero, loop :load scalar a : upper bound of what to load :load x(i) : a multiply x(i) :load y(i) : a multiply x(i) + y(i) : store into y(i) :increment index to x :increment index to y : compute bound :check if done