Question

MIPS ISA does not have all the instruction that one would wish for, for a good...

  1. MIPS ISA does not have all the instruction that one would wish for, for a good reason, the main “customer” is not a human programmer but a compiler. Pseudo-instructions can be added to an ISA to simplify the programming by humans. These are essentially mnemonics for a sequence of ISA instructions. Provide the expansions for the following pseudo-instructions:

Name

Assembly

C operation

Expansion

nop

nop

{}

                                                                              

not

not $r1, $r2

$r1 = ~$r2

branch if greater than

bgt $r1, $r2, C

if (x > y) then

move

mov $r1, $r2

x = y

clear

clear $r1

x = 0

load 16-bit immediate

without sign extension

li $r1, C

x = C

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

Expansions for pseudo code instructions as follows:

  1. sll $zero, $zero, 0
  2. not $t, $s, $zero
  3. slt $at, $t, $sbne $at, $zero, C
  4. $t, $s, $zero
  5. $t, $zero, $zero
  6. $t, $zero, C_lo
Add a comment
Know the answer?
Add Answer to:
MIPS ISA does not have all the instruction that one would wish for, for a good...
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
  • Hey, I am confused about the following MIPS questions - could you also provide an explanation...

    Hey, I am confused about the following MIPS questions - could you also provide an explanation with your answer? Thank you! 1. What is the value in $t1 when the sw instruction is executed? (i.e. what value is stored in result) li $t1, 0 li $t2, 1 li $t3, 10 loop: bgt $t2, $t3, end_loop mul $t1, $t1, $t2 addi $t2, $t2, 1 j loop end_loop: sw $t1, result 2. (a) If the label job is at 0x00401000, what value...

  • Implement the following statements using MS430 assembly instructions. You may use more than one, ...

    Implement the following statements using MS430 assembly instructions. You may use more than one, but you should minimize the number of instructions required. You can use both native and emulated instructions. Use hex notation for all numbers 1. (a) Move the word located in register R14 to R15 (b) Increment the word in R6 by 2. (c) Perform a bitwise ANDing of the word located at address 0x0240 with the datum in R15, placing the results in R15. (d) Rotate...

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
ADVERTISEMENT