Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need to know why is the following answer correct in detail? Translate the following RISC-V function F1 into machine code both in binary and

image text in transcribedI need to know why is the following answer correct in detail?

image text in transcribed

Translate the following RISC-V function F1 into machine code both in binary and hexadecimal: F1: addi x7, x7, -4 sw x21, 0 (x7) addi x5, x5, 12 auipc x21, 20 andi x21, x21, 331 blt x11, x21, L1 sub x10, x11, X10 beq x29, x29, Ex sub x10, x10, x11 lw x21, 0(x7) addi x7, x7, 4 jalr x3, 4(x4) Ll: Ex: If a caller uses the instruction: jal x4, F1 residing at address 400 to call the F1 function residing at address 1200 and if the values of x7, x10, x11, and x21 were 6000, 415, 402, and -138 respectively at call time, what would be the final values of x0, x3, x4, x7, x10, x11, and x21 at return time? Also what will be the value of the PC and of x21 immediately after the execution of the auipc instruction? The final values of x0, x3, x4, x7, x10, x11, and x21 are 0, 1248, 404, 6000, -13, 402, and -138 respectively. Immediately after the execution of auipc instruction, the PC and x21 values will be 1216 and 83132 respectively

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

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

=+free to pirate employees from competitors?

Answered: 1 week ago