summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjg0 <yyj9ob3v@anonaddy.com>2025-03-25 16:21:44 -0400
committerjg0 <yyj9ob3v@anonaddy.com>2025-03-25 16:21:44 -0400
commit341ffb58d33ed5f0ce4743ec0881e11964589966 (patch)
tree214c4b08f2830510bfb64d06c624d31e423168f9
parentef452571894a1c75805cfa9f58f8ccde28cd76e6 (diff)
fibonacci with blt and bne
-rw-r--r--fibonacci.s5
-rw-r--r--riscvtest_rom_image.txt5
2 files changed, 4 insertions, 6 deletions
diff --git a/fibonacci.s b/fibonacci.s
index 3e8ddd0..c3e75ba 100644
--- a/fibonacci.s
+++ b/fibonacci.s
@@ -12,6 +12,5 @@ loop: addi x5, x5, 4
12 lw x29, 0(x7) 12 lw x29, 0(x7)
13 add x30, x28, x29 13 add x30, x28, x29
14 sw x30, 0(x5) 14 sw x30, 0(x5)
15 beq x5, x9, done 15 blt x5, x9, loop
16 beq x5, x5 loop 16done: bne x5, x9 done \ No newline at end of file
17done: beq x5, x5 done \ No newline at end of file
diff --git a/riscvtest_rom_image.txt b/riscvtest_rom_image.txt
index da8099b..163add7 100644
--- a/riscvtest_rom_image.txt
+++ b/riscvtest_rom_image.txt
@@ -11,6 +11,5 @@ ff828393
110003ae83 110003ae83
1201de0f33 1201de0f33
1301e2a023 1301e2a023
1400928463 14fe92c2e3
15fe5280e3 1500929063
1600528063