8293007: riscv: failed to build after JDK-8290025

Reviewed-by: fyang, fjiang, shade
This commit is contained in:
Yadong Wang 2022-08-30 01:17:41 +00:00 committed by Fei Yang
parent 9424d6d487
commit e016363b54
16 changed files with 257 additions and 74 deletions

View file

@ -88,9 +88,11 @@ static void pass_arg3(MacroAssembler* masm, Register arg) {
}
}
void MacroAssembler::align(int modulus, int extra_offset) {
int MacroAssembler::align(int modulus, int extra_offset) {
CompressibleRegion cr(this);
intptr_t before = offset();
while ((offset() + extra_offset) % modulus != 0) { nop(); }
return (int)(offset() - before);
}
void MacroAssembler::call_VM_helper(Register oop_result, address entry_point, int number_of_arguments, bool check_exceptions) {
@ -1667,7 +1669,9 @@ void MacroAssembler::movoop(Register dst, jobject obj, bool immediate) {
// nmethod entry barrier necessitate using the constant pool. They have to be
// ordered with respected to oop access.
if (BarrierSet::barrier_set()->barrier_set_nmethod() != NULL || !immediate) {
// Using immediate literals would necessitate fence.i.
BarrierSet* bs = BarrierSet::barrier_set();
if ((bs->barrier_set_nmethod() != NULL && bs->barrier_set_assembler()->nmethod_patching_type() == NMethodPatchingType::conc_data_patch) || !immediate) {
address dummy = address(uintptr_t(pc()) & -wordSize); // A nearby aligned address
ld_constant(dst, Address(dummy, rspec));
} else