Translate the following RISC-V function F1 into machine code both in binary and hexadecimal: addi x9, х0, -5 add x10, х0, х9 F1: L2: sw x10, 20 (x0) lw x11, 20 (x0) beq x9, х11, L1 jal x0, L2 lui x8, 65 auipc x9, 321 jalr x9, 80 (x1) L1: If a caller uses the instruction: ial

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Problem 1:
Translate the following RISC-V function F1 into machine code both in binary and hexadecimal:
addi x9, х0, -5
add x10, х0, х9
sw x10, 20 (x0)
lw x11, 20 (x0)
beq x9, х11, L1
jal x0, L2
lui x8, 65
auipc x9, 321
jalr x9, 80 (х1)
F1:
L2:
L1:
If a caller uses the instruction:
jal x1, F1
residing at address 9200 to call the F1 function residing at address 2800, what would be the final values of x0, x1,
x8, x9, x10, and x11 at return time? What will be the values of the PC and of x9 immediately after the execution of
the auipc instruction?
Hint: Please lookup the Unprivileged ISA Specifications of the RISC-V processor (on https://riscv.org) to understand
the auipc instruction.
Transcribed Image Text:Problem 1: Translate the following RISC-V function F1 into machine code both in binary and hexadecimal: addi x9, х0, -5 add x10, х0, х9 sw x10, 20 (x0) lw x11, 20 (x0) beq x9, х11, L1 jal x0, L2 lui x8, 65 auipc x9, 321 jalr x9, 80 (х1) F1: L2: L1: If a caller uses the instruction: jal x1, F1 residing at address 9200 to call the F1 function residing at address 2800, what would be the final values of x0, x1, x8, x9, x10, and x11 at return time? What will be the values of the PC and of x9 immediately after the execution of the auipc instruction? Hint: Please lookup the Unprivileged ISA Specifications of the RISC-V processor (on https://riscv.org) to understand the auipc instruction.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY