提交 85e61f99 编写于 作者: S simonis

8028514: PPC64: Fix C++ Interpreter after '7195622: CheckUnhandledOops has limited usefulness now'

Summary: fix CPP-interpreter after CheckUnhandledOops was re-enabled in the fastdebug build
Reviewed-by: kvn, dholmes, lfoltan
上级 41e0be3c
......@@ -91,7 +91,7 @@ public:
#define LOCALS_SLOT(offset) ((intptr_t*)&locals[-(offset)])
#define LOCALS_ADDR(offset) ((address)locals[-(offset)])
#define LOCALS_INT(offset) (*(jint*)&(locals[-(offset)]))
#define LOCALS_OBJECT(offset) ((oop)locals[-(offset)])
#define LOCALS_OBJECT(offset) (cast_to_oop(locals[-(offset)]))
#define LOCALS_LONG_AT(offset) (((address)&locals[-((offset) + 1)]))
#define LOCALS_DOUBLE_AT(offset) (((address)&locals[-((offset) + 1)]))
......
......@@ -188,7 +188,7 @@ BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result)
case T_OBJECT:
case T_ARRAY: {
oop* obj_p = *(oop**)lresult;
oop obj = (obj_p == NULL) ? NULL : *obj_p;
oop obj = (obj_p == NULL) ? (oop)NULL : *obj_p;
assert(obj == NULL || Universe::heap()->is_in(obj), "sanity check");
*oop_result = obj;
break;
......
......@@ -188,7 +188,7 @@ intptr_t NativeMovConstReg::data() const {
return MacroAssembler::get_const(addr);
} else if (MacroAssembler::is_set_narrow_oop(addr, cb->content_begin())) {
narrowOop no = (narrowOop)MacroAssembler::get_narrow_oop(addr, cb->content_begin());
return (intptr_t)oopDesc::decode_heap_oop(no);
return cast_from_oop<intptr_t>(oopDesc::decode_heap_oop(no));
} else {
assert(MacroAssembler::is_load_const_from_method_toc_at(addr), "must be load_const_from_pool");
......@@ -258,7 +258,7 @@ void NativeMovConstReg::set_data(intptr_t data) {
oop_Relocation *r = iter.oop_reloc();
if (oop_addr == NULL) {
oop_addr = r->oop_addr();
*oop_addr = (oop)data;
*oop_addr = cast_to_oop(data);
} else {
assert(oop_addr == r->oop_addr(), "must be only one set-oop here") ;
}
......
......@@ -83,7 +83,7 @@ public:
#define LOCALS_ADDR(offset) ((address)locals[-(offset)])
#define LOCALS_INT(offset) (*((jint*)&locals[-(offset)]))
#define LOCALS_FLOAT(offset) (*((jfloat*)&locals[-(offset)]))
#define LOCALS_OBJECT(offset) ((oop)locals[-(offset)])
#define LOCALS_OBJECT(offset) (cast_to_oop(locals[-(offset)]))
#define LOCALS_DOUBLE(offset) (((VMJavaVal64*)&locals[-((offset) + 1)])->d)
#define LOCALS_LONG(offset) (((VMJavaVal64*)&locals[-((offset) + 1)])->l)
#define LOCALS_LONG_AT(offset) (((address)&locals[-((offset) + 1)]))
......
......@@ -94,7 +94,7 @@ inline intptr_t* sender_sp() {
#define LOCALS_ADDR(offset) ((address)locals[-(offset)])
#define LOCALS_INT(offset) ((jint)(locals[-(offset)]))
#define LOCALS_FLOAT(offset) (*((jfloat*)&locals[-(offset)]))
#define LOCALS_OBJECT(offset) ((oop)locals[-(offset)])
#define LOCALS_OBJECT(offset) (cast_to_oop(locals[-(offset)]))
#define LOCALS_DOUBLE(offset) (((VMJavaVal64*)&locals[-((offset) + 1)])->d)
#define LOCALS_LONG(offset) (((VMJavaVal64*)&locals[-((offset) + 1)])->l)
#define LOCALS_LONG_AT(offset) (((address)&locals[-((offset) + 1)]))
......
......@@ -132,7 +132,7 @@
#define LOCALS_ADDR(offset) ((address)locals[-(offset)])
#define LOCALS_INT(offset) (*((jint*)&locals[-(offset)]))
#define LOCALS_FLOAT(offset) (*((jfloat*)&locals[-(offset)]))
#define LOCALS_OBJECT(offset) ((oop)locals[-(offset)])
#define LOCALS_OBJECT(offset) (cast_to_oop(locals[-(offset)]))
#define LOCALS_DOUBLE(offset) (((VMJavaVal64*)&locals[-((offset) + 1)])->d)
#define LOCALS_LONG(offset) (((VMJavaVal64*)&locals[-((offset) + 1)])->l)
#define LOCALS_LONG_AT(offset) (((address)&locals[-((offset) + 1)]))
......
......@@ -1810,7 +1810,7 @@ run:
// Profile checkcast with null_seen and receiver.
BI_PROFILE_UPDATE_CHECKCAST(/*null_seen=*/true, NULL);
}
((objArrayOopDesc *) arrObj)->obj_at_put(index, rhsObject);
((objArrayOop) arrObj)->obj_at_put(index, rhsObject);
UPDATE_PC_AND_TOS_AND_CONTINUE(1, -3);
}
CASE(_bastore):
......@@ -2828,7 +2828,7 @@ run:
if (TraceExceptions) {
ttyLocker ttyl;
ResourceMark rm;
tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")", except_oop->print_value_string(), except_oop());
tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")", except_oop->print_value_string(), (void*)except_oop());
tty->print_cr(" thrown in interpreter method <%s>", METHOD->print_value_string());
tty->print_cr(" at bci %d, continuing at %d for thread " INTPTR_FORMAT,
istate->bcp() - (intptr_t)METHOD->code_base(),
......@@ -2844,7 +2844,7 @@ run:
if (TraceExceptions) {
ttyLocker ttyl;
ResourceMark rm;
tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")", except_oop->print_value_string(), except_oop());
tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")", except_oop->print_value_string(), (void*)except_oop());
tty->print_cr(" thrown in interpreter method <%s>", METHOD->print_value_string());
tty->print_cr(" at bci %d, unwinding for thread " INTPTR_FORMAT,
istate->bcp() - (intptr_t)METHOD->code_base(),
......@@ -3213,7 +3213,7 @@ jfloat BytecodeInterpreter::stack_float(intptr_t *tos, int offset) {
}
oop BytecodeInterpreter::stack_object(intptr_t *tos, int offset) {
return (oop)tos [Interpreter::expr_index_at(-offset)];
return cast_to_oop(tos [Interpreter::expr_index_at(-offset)]);
}
jdouble BytecodeInterpreter::stack_double(intptr_t *tos, int offset) {
......@@ -3282,7 +3282,7 @@ jfloat BytecodeInterpreter::locals_float(intptr_t* locals, int offset) {
return (jfloat)locals[Interpreter::local_index_at(-offset)];
}
oop BytecodeInterpreter::locals_object(intptr_t* locals, int offset) {
return (oop)locals[Interpreter::local_index_at(-offset)];
return cast_to_oop(locals[Interpreter::local_index_at(-offset)]);
}
jdouble BytecodeInterpreter::locals_double(intptr_t* locals, int offset) {
return ((VMJavaVal64*)&locals[Interpreter::local_index_at(-(offset+1))])->d;
......@@ -3441,7 +3441,7 @@ BytecodeInterpreter::print() {
tty->print_cr("osr._osr_buf: " INTPTR_FORMAT, (uintptr_t) this->_result._osr._osr_buf);
tty->print_cr("osr._osr_entry: " INTPTR_FORMAT, (uintptr_t) this->_result._osr._osr_entry);
tty->print_cr("prev_link: " INTPTR_FORMAT, (uintptr_t) this->_prev_link);
tty->print_cr("native_mirror: " INTPTR_FORMAT, (uintptr_t) this->_oop_temp);
tty->print_cr("native_mirror: " INTPTR_FORMAT, (void*) this->_oop_temp);
tty->print_cr("stack_base: " INTPTR_FORMAT, (uintptr_t) this->_stack_base);
tty->print_cr("stack_limit: " INTPTR_FORMAT, (uintptr_t) this->_stack_limit);
tty->print_cr("monitor_base: " INTPTR_FORMAT, (uintptr_t) this->_monitor_base);
......
......@@ -395,7 +395,7 @@ protected:
}
static oop oop_at(DataLayout* layout, int index) {
return (oop)layout->cell_at(index);
return cast_to_oop(layout->cell_at(index));
}
static void set_intptr_at(DataLayout* layout, int index, intptr_t value) {
......@@ -1248,8 +1248,8 @@ public:
}
static Klass *receiver_unchecked(DataLayout* layout, uint row) {
oop recv = oop_at(layout, receiver_cell_index(row));
return (Klass *)recv;
Klass* recv = (Klass*)layout->cell_at(receiver_cell_index(row));
return recv;
}
static void increment_receiver_count_no_overflow(DataLayout* layout, Klass *rcvr) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册