mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-16 10:53:31 +00:00
8350855: RISC-V: print offset by assert of patch_offset_in_conditional_branch
Reviewed-by: fyang
This commit is contained in:
parent
2af76de05a
commit
eada1ea8d2
@ -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]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user