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 $50 and $51. How long is each vector? How many total instructions are executed? If $so = 20 and $s1 = 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,$80, #280 1.d $2,0 ($80) mul.d $82, $£2, $0 1.d $4,0 ($81) add.d $4, $£4, $£2 s.d $4,0 ($s1) addiu $s0, $s, #8 addiu $s1,$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 4 Write the equivalent vector code for the MIPS code above.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!