src/cpu/x86/vm/assembler_x86_64.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
6689060 Cdiff src/cpu/x86/vm/assembler_x86_64.cpp
src/cpu/x86/vm/assembler_x86_64.cpp
Print this page
*** 4148,4158 ****
// get oop result if there is one and reset the value in the thread
if (oop_result->is_valid()) {
movq(oop_result, Address(r15_thread, JavaThread::vm_result_offset()));
movptr(Address(r15_thread, JavaThread::vm_result_offset()), NULL_WORD);
! verify_oop(oop_result);
}
}
void MacroAssembler::check_and_handle_popframe(Register java_thread) {}
void MacroAssembler::check_and_handle_earlyret(Register java_thread) {}
--- 4148,4158 ----
// get oop result if there is one and reset the value in the thread
if (oop_result->is_valid()) {
movq(oop_result, Address(r15_thread, JavaThread::vm_result_offset()));
movptr(Address(r15_thread, JavaThread::vm_result_offset()), NULL_WORD);
! verify_oop(oop_result, "broken oop in call_VM_base");
}
}
void MacroAssembler::check_and_handle_popframe(Register java_thread) {}
void MacroAssembler::check_and_handle_earlyret(Register java_thread) {}
*** 4687,4696 ****
--- 4687,4700 ----
movq(rsp, r12);
popq(r12);
}
+ #ifndef PRODUCT
+ extern "C" void findpc(intptr_t x);
+ #endif
+
void MacroAssembler::debug(char* msg, int64_t pc, int64_t regs[]) {
// In order to get locks to work, we need to fake a in_VM state
if (ShowMessageBoxOnError ) {
JavaThread* thread = JavaThread::current();
JavaThreadState saved_state = thread->thread_state();
*** 4705,4714 ****
--- 4709,4723 ----
// XXX correct this offset for amd64
// This is the value of eip which points to where verify_oop will return.
if (os::message_box(msg, "Execution stopped, print registers?")) {
ttyLocker ttyl;
tty->print_cr("rip = 0x%016lx", pc);
+ #ifndef PRODUCT
+ tty->cr();
+ findpc(pc);
+ tty->cr();
+ #endif
tty->print_cr("rax = 0x%016lx", regs[15]);
tty->print_cr("rbx = 0x%016lx", regs[12]);
tty->print_cr("rcx = 0x%016lx", regs[14]);
tty->print_cr("rdx = 0x%016lx", regs[13]);
tty->print_cr("rdi = 0x%016lx", regs[8]);
*** 5185,5195 ****
jcc(Assembler::equal, ok);
stop("MacroAssembler::encode_heap_oop: heap base corrupted?");
bind(ok);
popq(rscratch1);
#endif
! verify_oop(r);
testq(r, r);
cmovq(Assembler::equal, r, r12_heapbase);
subq(r, r12_heapbase);
shrq(r, LogMinObjAlignmentInBytes);
}
--- 5194,5204 ----
jcc(Assembler::equal, ok);
stop("MacroAssembler::encode_heap_oop: heap base corrupted?");
bind(ok);
popq(rscratch1);
#endif
! verify_oop(r, "broken oop in encode_heap_oop");
testq(r, r);
cmovq(Assembler::equal, r, r12_heapbase);
subq(r, r12_heapbase);
shrq(r, LogMinObjAlignmentInBytes);
}
*** 5201,5215 ****
testq(r, r);
jcc(Assembler::notEqual, ok);
stop("null oop passed to encode_heap_oop_not_null");
bind(ok);
#endif
! verify_oop(r);
subq(r, r12_heapbase);
shrq(r, LogMinObjAlignmentInBytes);
}
void MacroAssembler::decode_heap_oop(Register r) {
assert (UseCompressedOops, "should be compressed");
#ifdef ASSERT
Label ok;
pushq(rscratch1);
--- 5210,5241 ----
testq(r, r);
jcc(Assembler::notEqual, ok);
stop("null oop passed to encode_heap_oop_not_null");
bind(ok);
#endif
! verify_oop(r, "broken oop in encode_heap_oop_not_null");
subq(r, r12_heapbase);
shrq(r, LogMinObjAlignmentInBytes);
}
+ void MacroAssembler::encode_heap_oop_not_null(Register dst, Register src) {
+ assert (UseCompressedOops, "should be compressed");
+ #ifdef ASSERT
+ Label ok;
+ testq(src, src);
+ jcc(Assembler::notEqual, ok);
+ stop("null oop passed to encode_heap_oop_not_null2");
+ bind(ok);
+ #endif
+ verify_oop(src, "broken oop in encode_heap_oop_not_null2");
+ if (dst != src) {
+ movq(dst, src);
+ }
+ subq(dst, r12_heapbase);
+ shrq(dst, LogMinObjAlignmentInBytes);
+ }
+
void MacroAssembler::decode_heap_oop(Register r) {
assert (UseCompressedOops, "should be compressed");
#ifdef ASSERT
Label ok;
pushq(rscratch1);
*** 5230,5240 ****
testq(r, r);
jccb(Assembler::equal, done);
leaq(r, Address(r12_heapbase, r, Address::times_8, 0));
#endif
bind(done);
! verify_oop(r);
}
void MacroAssembler::decode_heap_oop_not_null(Register r) {
assert (UseCompressedOops, "should only be used for compressed headers");
// Cannot assert, unverified entry point counts instructions (see .ad file)
--- 5256,5266 ----
testq(r, r);
jccb(Assembler::equal, done);
leaq(r, Address(r12_heapbase, r, Address::times_8, 0));
#endif
bind(done);
! verify_oop(r, "broken oop in decode_heap_oop");
}
void MacroAssembler::decode_heap_oop_not_null(Register r) {
assert (UseCompressedOops, "should only be used for compressed headers");
// Cannot assert, unverified entry point counts instructions (see .ad file)
*** 5241,5250 ****
--- 5267,5284 ----
// vtableStubs also counts instructions in pd_code_size_limit.
assert(Address::times_8 == LogMinObjAlignmentInBytes, "decode alg wrong");
leaq(r, Address(r12_heapbase, r, Address::times_8, 0));
}
+ void MacroAssembler::decode_heap_oop_not_null(Register dst, Register src) {
+ assert (UseCompressedOops, "should only be used for compressed headers");
+ // Cannot assert, unverified entry point counts instructions (see .ad file)
+ // vtableStubs also counts instructions in pd_code_size_limit.
+ assert(Address::times_8 == LogMinObjAlignmentInBytes, "decode alg wrong");
+ leaq(dst, Address(r12_heapbase, src, Address::times_8, 0));
+ }
+
Assembler::Condition MacroAssembler::negate_condition(Assembler::Condition cond) {
switch (cond) {
// Note some conditions are synonyms for others
case Assembler::zero: return Assembler::notZero;
case Assembler::notZero: return Assembler::zero;
src/cpu/x86/vm/assembler_x86_64.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File