Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

THIS NEEDS TO BE DONE USING MIPS INSTRUCTIONS Problem 3 For this problem, please write the MIPS instructions that implement a write onto the stack

THIS NEEDS TO BE DONE USING MIPS INSTRUCTIONS

image text in transcribed

image text in transcribed

Problem 3 For this problem, please write the MIPS instructions that implement a write onto the stack pointer. The stack pointer register $sp by convention points at the top item of the stack. The operating system sets the initial value of the stack. address Memory lower 335 $sp -> 876 556 -397 higher When stack is accessed (either get or store a value/variable), the stack pointer register should be updated. Let us assume we are storing the value of register $s0 on the stack. You need a couple of instructions to do this operation. need 2 destructons no tes ouly EE334 MIPS Instruction Set Reference Card OPCODE ARITHMETIC CORE INSTRUCTION SET MIPS /EMT/FT /FUNCT Ole) Reference Data FOR- NAME, MNEMONIC MAT OPERATION Branch On FP True beit iRTPeondO-PC4Brancdde (4) i Bsch On FP False belf niRIFPondPC-PC4BranchAddr4) 110- dis R LaRjaRn He-RR Divide Llsiged 4 R Lo-RinRint HRwR) (6 ib ad. FR FIMEFI)F a4 R (FLe-(FIh+1+ OPCODE FUNCT OHen) CORE INSTRUCTION SET . Divide NAME, MNEMONIC OPERATION (in Verilog) MAT R Rid)-+ I Rin) - Rin+ Signlatlem (1) 0/ 20 Add PAsd Single FPAd Double FP Compae Single cast FR FPoond-() FPCompae Double It/10-0 Ad tmediane (12) Add Imm. Unigned addiu A Usigned 1 Rin)- Rinl + SignExtimm 0/2 R ddu :0 CA R Feond-( And IFIALFR)t1:0 I Rin-R(n)& Zeroxtmm iRRIn-Rin PC-PC-4BraschAddr And lmediae * is t,or le) (op is or y3, , or ) 7 Divide Single di FR FIM-FI6)/FN) P Divide andi Banch On Egal beg (4) dv. R PILe1-(n Double FP Multiply Single i FR FER -FI6) FA) FP Muliply Double RIn-RIn P-PC4 chdd J C-mpddr Branch On Nut Equalbne (4) i.d R ML -nu Junp Jump And Link Jump Kegister Sal 17 Subract Single ub.a R F-PI-AI FPSubet Double Load FP Single Load FP Double R PO-RIng (ulrtule-(Ilrisla (Et+alitula ub.d FR K-124 b0 MRIn] Signinm7) Load Byte Unaigned Lbu 24 I FInl-MRnSigtn F-MERInSipExttn Fini-MRingsigaaline4 R R-Hi I Load Halfword Uosignod Load Lisked 25 +Siglnn1S:0) I Rin- MRn-Sigllm) I RH-(imm, 160 I Re-MIRIn)jsignlitn) R Rin OinRnD Move From Hi Move Fro Le a.7) atio R Rjed]-Le Load Upper In Loed Woed Mose From Conrol afet R R -CRin) Mutiply Mutiply Uesigd ite R (PLLe)-Rin Rin) Sn Righ Ar So FPSinge R HLLe)R Re) Nor nor R Rid- Rin hant I MIRIn+Sig n MRsiglln- int MRinSipEaliem4-Fn-1) 0/2 Or IKir-Rin2Zea R Rid)-Rn)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions