Question

The following MIPS branching pseudo instruction   bge $s0, $s1, Label # branch to Label if $s0...

The following MIPS branching pseudo instruction

  bge $s0, $s1, Label # branch to Label if $s0 is greater or equal $s1

will be translated to these two native instructions by the MIPS assembler:

  slt $at, $s0, $s1

  [a] $at, [b], Label

Fill for [a] and [b]?

Please explain aswell

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

[a] = beq

[b] = $zero

Explanation:

In MIPS, some operations can be performed with help of other instructions. The most common operations are unified in pseudo-instructions — they can be coded in assembly language, and assembler will expand them to real instructions.

Therefore, the expansion of bge $s0, $s1, Label # branch to Label if $s0 is greater or equal $s1 is

slt $at, $s0, $s1

beq $at, $zero, Label

Please give thumbsup, if you like it. Thanks.

Add a comment
Know the answer?
Add Answer to:
The following MIPS branching pseudo instruction   bge $s0, $s1, Label # branch to Label if $s0...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT