From eada1ea8d21c4811834e20ca467e136580d6cd0a Mon Sep 17 00:00:00 2001 From: Hamlin Li Date: Fri, 28 Feb 2025 09:05:42 +0000 Subject: [PATCH] 8350855: RISC-V: print offset by assert of patch_offset_in_conditional_branch Reviewed-by: fyang --- src/hotspot/cpu/riscv/macroAssembler_riscv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp b/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp index 4276595ffcc..f2bdd20890b 100644 --- a/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp +++ b/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp @@ -2300,7 +2300,7 @@ static int patch_offset_in_jal(address branch, int64_t offset) { static int patch_offset_in_conditional_branch(address branch, int64_t offset) { assert(Assembler::is_simm13(offset) && ((offset % 2) == 0), - "offset is too large to be patched in one beq/bge/bgeu/blt/bltu/bne instruction!\n"); + "offset (%ld) is too large to be patched in one beq/bge/bgeu/blt/bltu/bne instruction!\n", offset); Assembler::patch(branch, 31, 31, (offset >> 12) & 0x1); // offset[12] ==> branch[31] Assembler::patch(branch, 30, 25, (offset >> 5) & 0x3f); // offset[10:5] ==> branch[30:25] Assembler::patch(branch, 7, 7, (offset >> 11) & 0x1); // offset[11] ==> branch[7]