From 5d2ee37615dc28c2a87c6120acf2e624223029df Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Fri, 16 Aug 2024 05:42:50 -0400 Subject: [PATCH] riscv64: fix incorrect branch target --- src/arch/riscv64/CodeGen.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/riscv64/CodeGen.zig b/src/arch/riscv64/CodeGen.zig index 6531bf34d99c..11a52ad67f84 100644 --- a/src/arch/riscv64/CodeGen.zig +++ b/src/arch/riscv64/CodeGen.zig @@ -6594,7 +6594,7 @@ fn genInlineMemset( .tag = .beq, .data = .{ .b_type = .{ - .inst = @intCast(func.mir_instructions.len + 4), // points after the last inst + .inst = @intCast(func.mir_instructions.len + 3), // points ofter the last inst .rs1 = count, .rs2 = .zero, },