Register to reply

Detect hazard in MIPS- repost

by brad sue
Tags: detect, hazard, mips, repost
Share this thread:
brad sue
Nov27-08, 09:43 PM
P: 284
hi please I would some help with the MIPS hazard.


      add $t0, $t0, $v0
      addi $v0, $v0, -1
      bnez $v0, Loop

      li $v0, 4
      la $a0, result

      li $v0, 1
      move $a0, $t0

      b main
I see an hazard at the instructions that are bolded
What I would do is take the underlined instructions and put it like this:
addi $v0, $v0, -1
la $a0, result      
bnez $v0, Loop
Do I get it right? do I miss another hazard?

thank you
Phys.Org News Partner Science news on
Scientists develop 'electronic nose' for rapid detection of C. diff infection
Why plants in the office make us more productive
Tesla Motors dealing as states play factory poker

Register to reply

Related Discussions
Hazard function Set Theory, Logic, Probability, Statistics 3
MIPS help Programming & Computer Science 7
Pros and cons of MIPS relative to instruction set choices Electrical Engineering 1
Help with MIPS Programming & Computer Science 0
Small MIPS programmes Introductory Physics Homework 2