Unroll the loop so that there are two olditerations in the n

Unroll the loop so that there are two old-iterations in the new loop without scheduling. loop: LD FO, 0(R1) MULT F8 FO FO LD F4 1024 (Rl) ADD F10 FI0 F4 ADD F12 F12 F8 DADDIU Rl, Rl, +8 BNE Rl, R2, loop

Solution

loop:

MOVE R1, 0

LD   F0, R1

MULT F8 F0 // NO NEED TO MULTIPLY AGAIN WITH F0,one time is enough

LD F4 , &R1 // TAKES THE VALUE IN REGISTER R1 WHICH IS 1024

ADD F10 F4

ADD F12 F8

DADDIU R1, R1, +8

BNE R1,R2

JMP LOOP

 Unroll the loop so that there are two old-iterations in the new loop without scheduling. loop: LD FO, 0(R1) MULT F8 FO FO LD F4 1024 (Rl) ADD F10 FI0 F4 ADD F1

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site