From 45b57894d9e369535b92e4201abdf95df7560b14 Mon Sep 17 00:00:00 2001 From: Diego Camarmas Date: Thu, 12 Dec 2024 18:57:35 +0100 Subject: [PATCH] 4.1: minor update --- examples/RISCV/example7.s | 4 ++-- test/riscv/correct/examples/test_riscv_example_007.out | 2 +- test/riscv/correct/examples/test_riscv_example_007.s | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/RISCV/example7.s b/examples/RISCV/example7.s index c2f3fe39..f32606d7 100644 --- a/examples/RISCV/example7.s +++ b/examples/RISCV/example7.s @@ -12,7 +12,7 @@ main: li t3, 1 li t4, 4 la t5, w3 - li s7, 0 + li t0, 0 # loop initialization li t1, 0 @@ -24,7 +24,7 @@ loop1: beq t1, t2, end1 # if(t1 == t2) --> jump to fin1 # loop body mul t6, t1, t4 # t1 * t4 -> t6 lw t6, 0(t5) # Memory[t5] -> t6 - add s7, s7, t6 # t6 + s7 -> s7 + add t0, t0, t6 # t6 + t0 -> t0 # loop next... add t1, t1, t3 # t1 + t3 -> t1 diff --git a/test/riscv/correct/examples/test_riscv_example_007.out b/test/riscv/correct/examples/test_riscv_example_007.out index 36fee4c6..1bf2a3f4 100644 --- a/test/riscv/correct/examples/test_riscv_example_007.out +++ b/test/riscv/correct/examples/test_riscv_example_007.out @@ -1,3 +1,3 @@ -cr[PC]:0xfffffffe; ir[x6,t1]:0x5; ir[x7,t2]:0x5; ir[x23,s7]:0xf; ir[x28,t3]:0x1; ir[x29,t4]:0x4; ir[x30,t5]:0x200014; ir[x31,t6]:0x5; keyboard[0x0]:''; display[0x0]:''; +cr[PC]:0xfffffffe; ir[x5,t0]:0xf; ir[x6,t1]:0x5; ir[x7,t2]:0x5; ir[x28,t3]:0x1; ir[x29,t4]:0x4; ir[x30,t5]:0x200014; ir[x31,t6]:0x5; keyboard[0x0]:''; display[0x0]:''; diff --git a/test/riscv/correct/examples/test_riscv_example_007.s b/test/riscv/correct/examples/test_riscv_example_007.s index c2f3fe39..f32606d7 100644 --- a/test/riscv/correct/examples/test_riscv_example_007.s +++ b/test/riscv/correct/examples/test_riscv_example_007.s @@ -12,7 +12,7 @@ main: li t3, 1 li t4, 4 la t5, w3 - li s7, 0 + li t0, 0 # loop initialization li t1, 0 @@ -24,7 +24,7 @@ loop1: beq t1, t2, end1 # if(t1 == t2) --> jump to fin1 # loop body mul t6, t1, t4 # t1 * t4 -> t6 lw t6, 0(t5) # Memory[t5] -> t6 - add s7, s7, t6 # t6 + s7 -> s7 + add t0, t0, t6 # t6 + t0 -> t0 # loop next... add t1, t1, t3 # t1 + t3 -> t1