Loop: LD F0, 0(R1) ;F0 - array element 
 ADDD F4, F0, F2 ;add scalar in F2 
 SD 0(R1), F4 ;store result 
 SUBI R1, R1, #8 ;decrement pointer  
;8 bytes (per double) 
 BENZ R1, Loop ;branch R1 != zero

on DLX this looks:

Cycles 
Loop: LD F0, 0(R1) 1 
  stall  2 
  ADDD F4, F0,F2 3 
  stall  4 
  stall  5 
  SD 0(R1), F4 6 
  SUBI R1, R1,#8 7 
  BENZ R1, Loop 8 
  stall  9

i want to understand when does the stall occur?

thanks

you guys still think cheating is not ethical? i dont think i will be able to pass this f... class without cheating..

commented: Just because you can't pass a class without cheating doesn't make it ethical -2
commented: No, you still haven't changed my opinion that cheating is wrong. -4
commented: Then you should consider doing something else -3
commented: Cheating Is Wrong.... Assembly Is Right. -2
commented: You're a bad bad man, serken sendur. -1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.