8337797: Additional ExternalAddress cleanup
Reviewed-by: adinn, thartmann
This commit is contained in:
parent
3cf3f300de
commit
60fa08fcfe
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -201,7 +201,7 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
|
||||
|
||||
{
|
||||
__ enter();
|
||||
__ lea(rscratch1, ExternalAddress(slow_case_addr));
|
||||
__ lea(rscratch1, RuntimeAddress(slow_case_addr));
|
||||
__ blr(rscratch1);
|
||||
__ leave();
|
||||
__ ret(lr);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
|
||||
* Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
@ -173,12 +173,7 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
|
||||
|
||||
{
|
||||
__ enter();
|
||||
ExternalAddress target(slow_case_addr);
|
||||
__ relocate(target.rspec(), [&] {
|
||||
int32_t offset;
|
||||
__ la(t0, target.target(), offset);
|
||||
__ jalr(t0, offset);
|
||||
});
|
||||
__ rt_call(slow_case_addr);
|
||||
__ leave();
|
||||
__ ret();
|
||||
}
|
||||
|
@ -1780,6 +1780,7 @@ void Assembler::call(Register dst) {
|
||||
|
||||
|
||||
void Assembler::call(Address adr) {
|
||||
assert(!adr._rspec.reloc()->is_data(), "should not use ExternalAddress for call");
|
||||
InstructionMark im(this);
|
||||
prefix(adr);
|
||||
emit_int8((unsigned char)0xFF);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -138,7 +138,7 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
// tail call
|
||||
__ jump (ExternalAddress(slow_case_addr));
|
||||
__ jump (RuntimeAddress(slow_case_addr));
|
||||
|
||||
__ flush ();
|
||||
|
||||
@ -251,7 +251,7 @@ address JNI_FastGetField::generate_fast_get_long_field() {
|
||||
__ pop (rsi);
|
||||
address slow_case_addr = jni_GetLongField_addr();;
|
||||
// tail call
|
||||
__ jump (ExternalAddress(slow_case_addr));
|
||||
__ jump (RuntimeAddress(slow_case_addr));
|
||||
|
||||
__ flush ();
|
||||
|
||||
@ -350,7 +350,7 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) {
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
// tail call
|
||||
__ jump (ExternalAddress(slow_case_addr));
|
||||
__ jump (RuntimeAddress(slow_case_addr));
|
||||
|
||||
__ flush ();
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -118,7 +118,7 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
|
||||
default: break;
|
||||
}
|
||||
// tail call
|
||||
__ jump (ExternalAddress(slow_case_addr), rscratch1);
|
||||
__ jump (RuntimeAddress(slow_case_addr), rscratch1);
|
||||
|
||||
__ flush ();
|
||||
|
||||
@ -206,7 +206,7 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) {
|
||||
default: break;
|
||||
}
|
||||
// tail call
|
||||
__ jump (ExternalAddress(slow_case_addr), rscratch1);
|
||||
__ jump (RuntimeAddress(slow_case_addr), rscratch1);
|
||||
|
||||
__ flush ();
|
||||
|
||||
|
@ -2329,7 +2329,7 @@ void MacroAssembler::incrementl(Address dst, int value) {
|
||||
|
||||
void MacroAssembler::jump(AddressLiteral dst, Register rscratch) {
|
||||
assert(rscratch != noreg || always_reachable(dst), "missing");
|
||||
|
||||
assert(!dst.rspec().reloc()->is_data(), "should not use ExternalAddress for jump");
|
||||
if (reachable(dst)) {
|
||||
jmp_literal(dst.target(), dst.rspec());
|
||||
} else {
|
||||
@ -2340,7 +2340,7 @@ void MacroAssembler::jump(AddressLiteral dst, Register rscratch) {
|
||||
|
||||
void MacroAssembler::jump_cc(Condition cc, AddressLiteral dst, Register rscratch) {
|
||||
assert(rscratch != noreg || always_reachable(dst), "missing");
|
||||
|
||||
assert(!dst.rspec().reloc()->is_data(), "should not use ExternalAddress for jump_cc");
|
||||
if (reachable(dst)) {
|
||||
InstructionMark im(this);
|
||||
relocate(dst.reloc());
|
||||
|
@ -704,10 +704,10 @@ static void range_check(MacroAssembler* masm, Register pc_reg, Register temp_reg
|
||||
address code_start, address code_end,
|
||||
Label& L_ok) {
|
||||
Label L_fail;
|
||||
__ lea(temp_reg, ExternalAddress(code_start));
|
||||
__ lea(temp_reg, AddressLiteral(code_start, relocInfo::none));
|
||||
__ cmpptr(pc_reg, temp_reg);
|
||||
__ jcc(Assembler::belowEqual, L_fail);
|
||||
__ lea(temp_reg, ExternalAddress(code_end));
|
||||
__ lea(temp_reg, AddressLiteral(code_end, relocInfo::none));
|
||||
__ cmpptr(pc_reg, temp_reg);
|
||||
__ jcc(Assembler::below, L_ok);
|
||||
__ bind(L_fail);
|
||||
|
@ -824,10 +824,10 @@ static void range_check(MacroAssembler* masm, Register pc_reg, Register temp_reg
|
||||
address code_start, address code_end,
|
||||
Label& L_ok) {
|
||||
Label L_fail;
|
||||
__ lea(temp_reg, ExternalAddress(code_start));
|
||||
__ lea(temp_reg, AddressLiteral(code_start, relocInfo::none));
|
||||
__ cmpptr(pc_reg, temp_reg);
|
||||
__ jcc(Assembler::belowEqual, L_fail);
|
||||
__ lea(temp_reg, ExternalAddress(code_end));
|
||||
__ lea(temp_reg, AddressLiteral(code_end, relocInfo::none));
|
||||
__ cmpptr(pc_reg, temp_reg);
|
||||
__ jcc(Assembler::below, L_ok);
|
||||
__ bind(L_fail);
|
||||
|
@ -215,7 +215,7 @@ void StubGenerator::array_overlap_test(address no_overlap_target, Label* NOLp, A
|
||||
__ cmpptr(to, from);
|
||||
__ lea(end_from, Address(from, count, sf, 0));
|
||||
if (NOLp == nullptr) {
|
||||
ExternalAddress no_overlap(no_overlap_target);
|
||||
RuntimeAddress no_overlap(no_overlap_target);
|
||||
__ jump_cc(Assembler::belowEqual, no_overlap);
|
||||
__ cmpptr(to, end_from);
|
||||
__ jump_cc(Assembler::aboveEqual, no_overlap);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -180,7 +180,7 @@ bool os::win32::register_code_area(char *low, char *high) {
|
||||
MacroAssembler* masm = new MacroAssembler(&cb);
|
||||
pDCD = (pDynamicCodeData) masm->pc();
|
||||
|
||||
masm->jump(ExternalAddress((address)&HandleExceptionFromCodeCache), rscratch1);
|
||||
masm->jump(RuntimeAddress((address)&HandleExceptionFromCodeCache), rscratch1);
|
||||
masm->flush();
|
||||
|
||||
// Create an Unwind Structure specifying no unwind info
|
||||
|
Loading…
Reference in New Issue
Block a user