Skip to content

Commit 3496b13

Browse files
committed
Add an assertion for patchable jals' alignment
1 parent 039f292 commit 3496b13

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,7 @@ void LIR_Assembler::ic_call(LIR_OpJavaCall* op) {
13491349

13501350
void LIR_Assembler::emit_static_call_stub() {
13511351
address call_pc = __ pc();
1352+
assert((__ offset() % 4) == 0, "call pc (patchable jals) must be aligned to maintain atomicity");
13521353
address stub = __ start_a_stub(call_stub_size());
13531354
if (stub == NULL) {
13541355
bailout("static call stub overflow");

0 commit comments

Comments
 (0)