8294087: RISC-V: RVC: Fix a potential alignment issue and add more alignment assertions for the patchable calls/nops

Reviewed-by: shade, fjiang, fyang
This commit is contained in:
Xiaolin Zheng 2022-09-22 11:43:47 +00:00 committed by Fei Yang
parent 3fa6778ab2
commit a216960d71
9 changed files with 30 additions and 5 deletions

View file

@ -2828,6 +2828,11 @@ address MacroAssembler::trampoline_call(Address entry) {
}
address call_pc = pc();
#ifdef ASSERT
if (entry.rspec().type() != relocInfo::runtime_call_type) {
assert_alignment(call_pc);
}
#endif
relocate(entry.rspec());
if (!far_branches()) {
jal(entry.target());