Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Consider the instruction seq, which has the format: seq $rd, $rs, $rt. a. The instruction sets $rd to 1 if and only if $rs

1) Consider the instruction seq, which has the format: seq $rd, $rs, $rt.

a. The instruction sets $rd to 1 if and only if $rs == $rt. Otherwise it sets $rd to 0. i.

i. Provide an informal RTL (register transfer language) describing the instruction semantics

ii. Explain the way that the instruction is mapped into slide 4-66 from the book by Patterson (below).

2) Consider the instruction sovi, which has the format: sovi $rt, $rs, constant.

a. The instruction sets $rt to 1 if and only if the overflow flag is set. Otherwise it sets $rt to 0. Next, in any case the instruction resets the overflow flag to 0.

i. Provide an informal RTL (register transfer language) describing the instruction semantics

ii. Explain the way that the instruction is mapped into slide 4-66 from the book by Patterson (below).

3) Consider the instruction swi which has the format: swi $rd, $rt($rs). The instruction stores the contents of the register $rd into the memory address pointed to by $rs + $rt.

i. Provide an informal RTL (register transfer language) describing the instruction semantics

ii. Explain the way that the instruction is mapped into slide 4-66 from the book by Patterson (below).

4) Consider the instruction ballt, which has the format: ballt $rt, $rs, func. The instruction calls the function func if and only if $rs

i. Provide an informal RTL (register transfer language) describing the instruction semantics

ii. Explain the way that the instruction is mapped into slide 4-66 from the book by Patterson (below).

5) Consider the instruction beq $0, $0 out. This instruction might be considered as an exception with respect to branch prediction since it is an unconditional change of flow.

a. What type of hardware mechanism should be used with respect to branch prediction in this case?

b. How should the compiler treat this instruction if no brunch prediction is available in the hardware.

image text in transcribed

IDEX WB EXMEM Control WB EX WB FAD Add Shift eft 2 ALUSrc PAadress regster1 data 1 Read regster 2 ALU ALU Instr Read Registers Read data 2 Wrne Write [15- 01 16 / Sign-) 32 control 20-16] 5-11 IDEX WB EXMEM Control WB EX WB FAD Add Shift eft 2 ALUSrc PAadress regster1 data 1 Read regster 2 ALU ALU Instr Read Registers Read data 2 Wrne Write [15- 01 16 / Sign-) 32 control 20-16] 5-11

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

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions

Question

Would you advise David to accept the position? Why or why not?

Answered: 1 week ago