mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8319700: [AArch64] C2 compilation fails with "Field too big for insn"
Reviewed-by: aph, thartmann
This commit is contained in:
parent
99b9cb0a2e
commit
3787ff8d1d
@ -1290,6 +1290,9 @@ static bool aarch64_test_and_branch_reachable(int branch_offset, int target_offs
|
||||
return test_and_branch_to_trampoline_delta < test_and_branch_delta_limit;
|
||||
}
|
||||
|
||||
ZLoadBarrierStubC2Aarch64::ZLoadBarrierStubC2Aarch64(const MachNode* node, Address ref_addr, Register ref)
|
||||
: ZLoadBarrierStubC2(node, ref_addr, ref), _test_and_branch_reachable_entry(), _offset(), _deferred_emit(false), _test_and_branch_reachable(false) {}
|
||||
|
||||
ZLoadBarrierStubC2Aarch64::ZLoadBarrierStubC2Aarch64(const MachNode* node, Address ref_addr, Register ref, int offset)
|
||||
: ZLoadBarrierStubC2(node, ref_addr, ref), _test_and_branch_reachable_entry(), _offset(offset), _deferred_emit(false), _test_and_branch_reachable(false) {
|
||||
PhaseOutput* const output = Compile::current()->output();
|
||||
@ -1319,6 +1322,12 @@ int ZLoadBarrierStubC2Aarch64::get_stub_size() {
|
||||
return cb.insts_size();
|
||||
}
|
||||
|
||||
ZLoadBarrierStubC2Aarch64* ZLoadBarrierStubC2Aarch64::create(const MachNode* node, Address ref_addr, Register ref) {
|
||||
ZLoadBarrierStubC2Aarch64* const stub = new (Compile::current()->comp_arena()) ZLoadBarrierStubC2Aarch64(node, ref_addr, ref);
|
||||
register_stub(stub);
|
||||
return stub;
|
||||
}
|
||||
|
||||
ZLoadBarrierStubC2Aarch64* ZLoadBarrierStubC2Aarch64::create(const MachNode* node, Address ref_addr, Register ref, int offset) {
|
||||
ZLoadBarrierStubC2Aarch64* const stub = new (Compile::current()->comp_arena()) ZLoadBarrierStubC2Aarch64(node, ref_addr, ref, offset);
|
||||
register_stub(stub);
|
||||
|
||||
@ -265,10 +265,12 @@ private:
|
||||
bool _deferred_emit;
|
||||
bool _test_and_branch_reachable;
|
||||
|
||||
ZLoadBarrierStubC2Aarch64(const MachNode* node, Address ref_addr, Register ref);
|
||||
ZLoadBarrierStubC2Aarch64(const MachNode* node, Address ref_addr, Register ref, int offset);
|
||||
|
||||
int get_stub_size();
|
||||
public:
|
||||
static ZLoadBarrierStubC2Aarch64* create(const MachNode* node, Address ref_addr, Register ref);
|
||||
static ZLoadBarrierStubC2Aarch64* create(const MachNode* node, Address ref_addr, Register ref, int offset);
|
||||
|
||||
virtual void emit_code(MacroAssembler& masm);
|
||||
|
||||
@ -48,7 +48,7 @@ static void z_keep_alive_load_barrier(MacroAssembler& _masm, const MachNode* nod
|
||||
__ relocate(barrier_Relocation::spec(), ZBarrierRelocationFormatMarkBadBeforeMov);
|
||||
__ movzw(tmp, barrier_Relocation::unpatched);
|
||||
__ tst(ref, tmp);
|
||||
ZLoadBarrierStubC2* const stub = ZLoadBarrierStubC2::create(node, ref_addr, ref);
|
||||
ZLoadBarrierStubC2Aarch64* const stub = ZLoadBarrierStubC2Aarch64::create(node, ref_addr, ref);
|
||||
__ br(Assembler::NE, *stub->entry());
|
||||
z_uncolor(_masm, node, ref);
|
||||
__ bind(*stub->continuation());
|
||||
|
||||
@ -42,6 +42,7 @@
|
||||
#include "opto/rootnode.hpp"
|
||||
#include "opto/runtime.hpp"
|
||||
#include "opto/type.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/growableArray.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
@ -226,6 +227,7 @@ Label* ZBarrierStubC2::continuation() {
|
||||
}
|
||||
|
||||
ZLoadBarrierStubC2* ZLoadBarrierStubC2::create(const MachNode* node, Address ref_addr, Register ref) {
|
||||
AARCH64_ONLY(fatal("Should use ZLoadBarrierStubC2Aarch64::create"));
|
||||
ZLoadBarrierStubC2* const stub = new (Compile::current()->comp_arena()) ZLoadBarrierStubC2(node, ref_addr, ref);
|
||||
register_stub(stub);
|
||||
|
||||
@ -275,6 +277,7 @@ void ZLoadBarrierStubC2::emit_code(MacroAssembler& masm) {
|
||||
}
|
||||
|
||||
ZStoreBarrierStubC2* ZStoreBarrierStubC2::create(const MachNode* node, Address ref_addr, Register new_zaddress, Register new_zpointer, bool is_native, bool is_atomic) {
|
||||
AARCH64_ONLY(fatal("Should use ZStoreBarrierStubC2Aarch64::create"));
|
||||
ZStoreBarrierStubC2* const stub = new (Compile::current()->comp_arena()) ZStoreBarrierStubC2(node, ref_addr, new_zaddress, new_zpointer, is_native, is_atomic);
|
||||
register_stub(stub);
|
||||
|
||||
|
||||
@ -52,9 +52,9 @@ static void inc_trampoline_stubs_count();
|
||||
static int trampoline_stubs_count();
|
||||
static int stubs_start_offset();
|
||||
|
||||
public:
|
||||
ZBarrierStubC2(const MachNode* node);
|
||||
|
||||
public:
|
||||
RegMask& live() const;
|
||||
Label* entry();
|
||||
Label* continuation();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user