Question: 3 . 9 LAB: Arithmetic expression - ADD / SUB / MUL Given the mapping of registers to variables below, write a program in LEGv

3.9 LAB: Arithmetic expression - ADD/SUB/MUL
Given the mapping of registers to variables below, write a program in LEGv8 to implement the following expression: Z =(A+B) X (C-D)3.9 LAB: Arithmetic expression - ADD/SUB/MUL
Given the mapping of registers to variables below, write a program to implement the following expression:
Ex: If the values of x9,x10,x11, and x12 are initialized in the simulator as:
the result is stored in x19 :
Note: Use the '+' button under the Registers display to initialize register values.
This zyLab platform supports the following LEGv8 instructions:
Arithmetic: ADD, ADDS, ADDI, ADDIS, MUL, SDIV, SUB, SUBS, SUBI, SUBIS
Data transfer: LDURB, LDUR, LDURH, LDURSW, MOVK, MOVZ, STURB, STUR, STURH, STURW
Logical: AND, ANDI, EOR, EORI, ORR, ORRI, LSL, LSR
Conditional branch: B.HS, B.LO, B.EQ, B.GT, B.GE, B.HI, B.LT, B.LE, B.LS, B.MI, B.NE, B.VC, B.VS, B.PL, CBZ, CBNZ
Unconditional jump: B, BL, BR
3 . 9 LAB: Arithmetic expression - ADD / SUB /

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!