Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following fragment of C code: if (A > B) C(A+B) elset C-(A+B) Consider the following constraints to answer this question. Assume that A,

image text in transcribed

Consider the following fragment of C code: if (A > B) C(A+B) elset C-(A+B) Consider the following constraints to answer this question. Assume that A, B, and C are 64-bit integers. Use instructions for 64t irseg use DADD (for 64-bip instcad of ADD (or 32-6i0) All data values are kept in memory (at addresses 2000, 2008, and 2016 for A, B, and C, respec- tively). Assume that 4, 8, and 10 are stored in the memory addresses 2000, 2008, and 2016 respectively You must use BNE or BEQ instruction for the branching. (Hint: See SLT (Set-on-Less-Than) instruction. MIPS reference: http://www.mrc.uidaho.edu/mrc/people/jff/digital/MIPSir.html) In the next page, write your answers for the following questions: (a) Write the code in MIPS assembly (b) How many instructions are executed dynamically? (c) How many memory-data references will be executed? (d) What is the code size in bytes? (Count only the bytes for instructions.)

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

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

List some legal issues of analytics.

Answered: 1 week ago

Question

Find the limit. 1- 2x? x* 2x? lim 5 + x 3x* x -00

Answered: 1 week ago

Question

How to reverse a Armstrong number by using double linked list ?

Answered: 1 week ago

Question

=+5 Does this case provide an example of the future for IHRM?

Answered: 1 week ago

Question

=+4 How did it affect HR?

Answered: 1 week ago