Discussion:
Branch displacement in conditional statements
(too old to reply)
A. Venkateswaran
2004-07-14 04:31:08 UTC
Permalink
When checking the IF condition, if false, can we assume that the distance to the else/elseif block that follows (or endif if there is no else/elseif following) can be stored within a single branch instruction (ie. beq) ? If not, does that mean we have to beq to a nearby location, then use jr to reach the final destination?

Thanks in advance,

Anandh
Danny Su
2004-07-14 00:32:54 UTC
Permalink
Professor said we don't have to worry about this for the assignment.
Troy Mark Gonsalves
2004-07-20 17:53:08 UTC
Permalink
Like Danny said, don't worry about it.

The memory in the Mips simulator is about 16k, and branches can
completely cover that.
Post by A. Venkateswaran
When checking the IF condition, if false, can we assume that the distance to the else/elseif block that follows (or endif if there is no else/elseif following) can be stored within a single branch instruction (ie. beq) ? If not, does that mean we have to beq to a nearby location, then use jr to reach the final destination?
Thanks in advance,
Anandh
Continue reading on narkive:
Search results for 'Branch displacement in conditional statements' (Questions and Answers)
7
replies
name 100 words that begain with the letter e?
started 2006-04-05 15:09:08 UTC
mathematics
Loading...