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
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
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
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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!