Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer all questions. 8. Compile the following high-level code into RISC-V pseudo assembly language. Assume variable a and val are stored in memory as

Please answer all questions.

image text in transcribed

8. Compile the following high-level code into RISC-V pseudo assembly language. Assume variable a and val are stored in memory as words. Make sure you load these values into registers before you use them and store back any changes to memory. You can use "lw x5, a" and "sw x5, a" as pseudoinstructions for load and store a word for variable a, considering a is a symbol for the address of the memory that store the value of a. This question is for you to practice using shift-logic instruction, logic (AND, OR, etc) instructions as well as branch instructions. if (a > 16) + 10; } 9. Compile the following high-level code into RISC-V pseudo assembly language. Assume a, b, and c are stored in memory as words. Use x5, x6 and 7 for a, b, and c. When the computation completes, the variable whose value changes should be stored back to memory. You can use "lw x5, a" and "sw x5, a" as pseudoinstructions for load and store a word for variable a. if (a

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

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions

Question

LO6 Describe how individual pay rates are set.

Answered: 1 week ago