mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
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:
parent
3fa6778ab2
commit
a216960d71
9 changed files with 30 additions and 5 deletions
|
@ -30,6 +30,7 @@
|
|||
#include "asm/assembler.hpp"
|
||||
#include "code/vmreg.hpp"
|
||||
#include "metaprogramming/enableIf.hpp"
|
||||
#include "nativeInst_riscv.hpp"
|
||||
#include "oops/compressedOops.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
|
@ -49,6 +50,9 @@ class MacroAssembler: public Assembler {
|
|||
|
||||
// Alignment
|
||||
int align(int modulus, int extra_offset = 0);
|
||||
static inline void assert_alignment(address pc, int alignment = NativeInstruction::instruction_size) {
|
||||
assert(is_aligned(pc, alignment), "bad alignment");
|
||||
}
|
||||
|
||||
// Stack frame creation/removal
|
||||
// Note that SP must be updated to the right place before saving/restoring RA and FP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue