mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
7034967: C1: assert(false) failed: error (assembler_sparc.cpp:2043)
Fix -XX:+VerifyOops Reviewed-by: kvn, never
This commit is contained in:
parent
fe74e1ba6a
commit
e8447846ee
5 changed files with 23 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2011, 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
|
||||
|
@ -387,7 +387,7 @@ void C1_MacroAssembler::verify_stack_oop(int stack_offset) {
|
|||
|
||||
void C1_MacroAssembler::verify_not_null_oop(Register r) {
|
||||
Label not_null;
|
||||
br_zero(Assembler::notEqual, false, Assembler::pt, r, not_null);
|
||||
br_notnull(r, false, Assembler::pt, not_null);
|
||||
delayed()->nop();
|
||||
stop("non-null oop required");
|
||||
bind(not_null);
|
||||
|
|
|
@ -7941,12 +7941,12 @@ void MacroAssembler::verify_oop_addr(Address addr, const char* s) {
|
|||
#endif
|
||||
push(rax); // save rax,
|
||||
// addr may contain rsp so we will have to adjust it based on the push
|
||||
// we just did
|
||||
// we just did (and on 64 bit we do two pushes)
|
||||
// NOTE: 64bit seemed to have had a bug in that it did movq(addr, rax); which
|
||||
// stores rax into addr which is backwards of what was intended.
|
||||
if (addr.uses(rsp)) {
|
||||
lea(rax, addr);
|
||||
pushptr(Address(rax, BytesPerWord));
|
||||
pushptr(Address(rax, LP64_ONLY(2 *) BytesPerWord));
|
||||
} else {
|
||||
pushptr(addr);
|
||||
}
|
||||
|
@ -8396,6 +8396,17 @@ void MacroAssembler::load_heap_oop(Register dst, Address src) {
|
|||
movptr(dst, src);
|
||||
}
|
||||
|
||||
// Doesn't do verfication, generates fixed size code
|
||||
void MacroAssembler::load_heap_oop_not_null(Register dst, Address src) {
|
||||
#ifdef _LP64
|
||||
if (UseCompressedOops) {
|
||||
movl(dst, src);
|
||||
decode_heap_oop_not_null(dst);
|
||||
} else
|
||||
#endif
|
||||
movptr(dst, src);
|
||||
}
|
||||
|
||||
void MacroAssembler::store_heap_oop(Address dst, Register src) {
|
||||
#ifdef _LP64
|
||||
if (UseCompressedOops) {
|
||||
|
|
|
@ -1709,6 +1709,7 @@ class MacroAssembler: public Assembler {
|
|||
void store_klass(Register dst, Register src);
|
||||
|
||||
void load_heap_oop(Register dst, Address src);
|
||||
void load_heap_oop_not_null(Register dst, Address src);
|
||||
void store_heap_oop(Address dst, Register src);
|
||||
|
||||
// Used for storing NULL. All other oop constants should be
|
||||
|
|
|
@ -316,7 +316,9 @@ void PatchingStub::emit_code(LIR_Assembler* ce) {
|
|||
Register tmp2 = rbx;
|
||||
__ push(tmp);
|
||||
__ push(tmp2);
|
||||
__ load_heap_oop(tmp2, Address(_obj, java_lang_Class::klass_offset_in_bytes()));
|
||||
// Load without verification to keep code size small. We need it because
|
||||
// begin_initialized_entry_offset has to fit in a byte. Also, we know it's not null.
|
||||
__ load_heap_oop_not_null(tmp2, Address(_obj, java_lang_Class::klass_offset_in_bytes()));
|
||||
__ get_thread(tmp);
|
||||
__ cmpptr(tmp, Address(tmp2, instanceKlass::init_thread_offset_in_bytes() + sizeof(klassOopDesc)));
|
||||
__ pop(tmp2);
|
||||
|
|
|
@ -1456,7 +1456,7 @@ void LIRGenerator::G1SATBCardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_Opr
|
|||
|
||||
if (addr->is_address()) {
|
||||
LIR_Address* address = addr->as_address_ptr();
|
||||
LIR_Opr ptr = new_register(T_OBJECT);
|
||||
LIR_Opr ptr = new_pointer_register();
|
||||
if (!address->index()->is_valid() && address->disp() == 0) {
|
||||
__ move(address->base(), ptr);
|
||||
} else {
|
||||
|
@ -1508,7 +1508,9 @@ void LIRGenerator::CardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_OprDesc*
|
|||
LIR_Const* card_table_base = new LIR_Const(((CardTableModRefBS*)_bs)->byte_map_base);
|
||||
if (addr->is_address()) {
|
||||
LIR_Address* address = addr->as_address_ptr();
|
||||
LIR_Opr ptr = new_register(T_OBJECT);
|
||||
// ptr cannot be an object because we use this barrier for array card marks
|
||||
// and addr can point in the middle of an array.
|
||||
LIR_Opr ptr = new_pointer_register();
|
||||
if (!address->index()->is_valid() && address->disp() == 0) {
|
||||
__ move(address->base(), ptr);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue