Course Solutions Uncategorized (Answered):Translate Into Risc V Assembly And Translate The Following Risc V Code Into C 1 . . . .

(Answered):Translate Into Risc V Assembly And Translate The Following Risc V Code Into C 1 . . . .

Question Description

1.translate into RISC-V Assembly

variable rptin x19 register.

if(rpt>0){

rpt=rpt-1;

goto loop

}

2.Translate the following Risc-V code into C.

variable ‘i’ in register x5, variable ‘result’ in x6 ,base address of integer ‘memarray’ in x10

addi x6,x0,0

addi x29,x0,100

LOOP: ld x7,0(x10)

add x5,x5,x7

addi x10,x10,8

addi x6,x6,1

blt x6,x29, LOOP

Solution


A solution will be send shortly . . . .  .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : 4g 31 Ci 2 39 Question Ssh Copy Id Demo 198511000 Note Mac User Ssh Copy Id However Instal Q29649264 . . . .(Solved) : 4g 31 Ci 2 39 Question Ssh Copy Id Demo 198511000 Note Mac User Ssh Copy Id However Instal Q29649264 . . . .

<p dir="ltr"><img src="https://media.cheggcdn.com/media%2F42c%2F42c6db4d-d3e6-458f-8537-c45e230ad3a9%2Fimage" alt="4G 31% CI 2:39 Question below ssh-copy-id demo@198.51.100.0 Note: If you are a Mac user, ssh-copy-id will no can, however, install it using Homebrew: brew install ssh-copy-id