Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For the following MIPS programming exercise, you may use only these instructions or macros: add addi addiu addu and andi div divu li lui lw

For the following MIPS programming exercise, you may use only these instructions or macros:

add addi addiu addu and andi div divu li lui lw mfhi mflo mult multu nor or ori sll sra srl sub subu sw xor xori

Evaluate the polynomial: 2x3 - 3x2 + 5x + 12 Use symbolic addresses for variables x and answer (holds the result). Assume that the value in x is small enough so that all results fit into 32 bits. Since load delays are turned on in SPIM be careful what instructions are placed in the load delay slot. Verify that the program works by using several initial values for x. Use x = 0 and x = 1 to start since this will make debugging easy. Then try some other values, such as x = 10 and x = -1. Write the program following the hardware rule that two or more instructions must follow a mflo instruction before another mult instruction (the delay slot). Try to put useful instructions in the delay slots that follow the mflo.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Shouhong Wang, Hai Wang

1st Edition

1612330150, 978-1612330150

More Books

Students also viewed these Databases questions

Question

List the characteristics of an effective HR strategy.

Answered: 1 week ago

Question

1. PricewaterhouseCoopers

Answered: 1 week ago

Question

3. SCC Soft Computer

Answered: 1 week ago