From 8b5faa374b98d3d64a4124991523c973b06dc458 Mon Sep 17 00:00:00 2001 From: "brice.boisson" Date: Mon, 27 Nov 2023 09:47:38 +0900 Subject: [PATCH] Add: neg branch test --- tb/test_source_code/tb_risc_v_cpu/branch_instruction.S | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tb/test_source_code/tb_risc_v_cpu/branch_instruction.S b/tb/test_source_code/tb_risc_v_cpu/branch_instruction.S index de99e7f..9cd200f 100644 --- a/tb/test_source_code/tb_risc_v_cpu/branch_instruction.S +++ b/tb/test_source_code/tb_risc_v_cpu/branch_instruction.S @@ -23,14 +23,17 @@ ble a1, a0, forth add a0, a0, 4 # R[10]=7 j second forth: -addi a1, zero, 4294967295 # R[11]=4294967295 +addi a1, zero, 4294967295 # R[11]=4294967295, R[11]=-1 bltu a0, a1, fifth addi a0, a0, 5 fifth: addi a1, zero, 16 # R[11]=16 -bleu a1, a0, end +bleu a1, a0, sixth add a0, a0, 6 # R[10]=16 j forth +sixth: +blt a0, a1, end +addi a0, a0, 7 # R[10]=23 end: -# R[10]=16 +# R[10]=23