From 5e550554b5d15cfb5d242c91aa4746b539323294 Mon Sep 17 00:00:00 2001 From: David Harris Date: Mon, 14 Oct 2024 08:58:37 -0700 Subject: [PATCH] Fixed bug in WALLY-init-lib label for RV32 --- tests/coverage/WALLY-init-lib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/coverage/WALLY-init-lib.h b/tests/coverage/WALLY-init-lib.h index b6b4f56b1..7e2aee771 100644 --- a/tests/coverage/WALLY-init-lib.h +++ b/tests/coverage/WALLY-init-lib.h @@ -134,9 +134,10 @@ self_loop: setmsb: li a0, 0x80000000 # 1 in bit 31 slli a1, a0, 1 # check if register is wider than 31 bits - beqz a1, 1f # yes, a0 has 1 in bit 31 + beqz a1, setmsbdone # yes, a0 has 1 in bit 31 slli a0, a0, 16 # no: shift a0 to have 1 inn bit 63 slli a0, a0, 16 # use two shifts of 16 bits each to be compatible with compiling either RV32 or 64 +setmsbdone: ret # return to calller .section .tohost