From 1c1b6a7ac0355297917b53bd2dc2351341884084 Mon Sep 17 00:00:00 2001 From: vhaudiquet Date: Mon, 9 Oct 2023 14:38:19 +0200 Subject: [PATCH] Added JAL negative case --- tests/jal.s | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/jal.s b/tests/jal.s index 6ba76ce..4d57401 100644 --- a/tests/jal.s +++ b/tests/jal.s @@ -10,12 +10,16 @@ _start: jal ra, fn0 ebreak +fnNeg: + # All good + addi a0, zero, 0 + ebreak + fn0: # Check ra value with our t0 construct beq t0, ra, eq0 ebreak eq0: - # All good - addi a0, zero, 0 - ebreak + # Try to jump back to a negative offset + jal ra, fnNeg