--- a/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp Mon Apr 18 01:33:28 2011 -0700
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp Mon Apr 18 06:50:57 2011 -0700
@@ -413,7 +413,7 @@
Label L_done, L_throw_exception;
const Register con_klass_temp = rcx; // same as Rcache
- __ movptr(con_klass_temp, Address(rax, oopDesc::klass_offset_in_bytes()));
+ __ load_klass(con_klass_temp, rax);
__ cmpptr(con_klass_temp, ExternalAddress((address)Universe::systemObjArrayKlassObj_addr()));
__ jcc(Assembler::notEqual, L_done);
__ cmpl(Address(rax, arrayOopDesc::length_offset_in_bytes()), 0);
@@ -423,7 +423,7 @@
// Load the exception from the system-array which wraps it:
__ bind(L_throw_exception);
- __ movptr(rax, Address(rax, arrayOopDesc::base_offset_in_bytes(T_OBJECT)));
+ __ load_heap_oop(rax, Address(rax, arrayOopDesc::base_offset_in_bytes(T_OBJECT)));
__ jump(ExternalAddress(Interpreter::throw_exception_entry()));
__ bind(L_done);
@@ -937,9 +937,9 @@
__ jcc(Assembler::zero, is_null);
// Move subklass into EBX
- __ movptr(rbx, Address(rax, oopDesc::klass_offset_in_bytes()));
+ __ load_klass(rbx, rax);
// Move superklass into EAX
- __ movptr(rax, Address(rdx, oopDesc::klass_offset_in_bytes()));
+ __ load_klass(rax, rdx);
__ movptr(rax, Address(rax, sizeof(oopDesc) + objArrayKlass::element_klass_offset_in_bytes()));
// Compress array+index*wordSize+12 into a single register. Frees ECX.
__ lea(rdx, element_address);
@@ -1992,7 +1992,7 @@
if (_desc->bytecode() == Bytecodes::_return_register_finalizer) {
assert(state == vtos, "only valid state");
__ movptr(rax, aaddress(0));
- __ movptr(rdi, Address(rax, oopDesc::klass_offset_in_bytes()));
+ __ load_klass(rdi, rax);
__ movl(rdi, Address(rdi, Klass::access_flags_offset_in_bytes() + sizeof(oopDesc)));
__ testl(rdi, JVM_ACC_HAS_FINALIZER);
Label skip_register_finalizer;
@@ -2939,7 +2939,7 @@
// get receiver klass
__ null_check(recv, oopDesc::klass_offset_in_bytes());
// Keep recv in rcx for callee expects it there
- __ movptr(rax, Address(recv, oopDesc::klass_offset_in_bytes()));
+ __ load_klass(rax, recv);
__ verify_oop(rax);
// profile this call
@@ -3019,7 +3019,7 @@
// Get receiver klass into rdx - also a null check
__ restore_locals(); // restore rdi
- __ movptr(rdx, Address(rcx, oopDesc::klass_offset_in_bytes()));
+ __ load_klass(rdx, rcx);
__ verify_oop(rdx);
// profile this call
@@ -3103,7 +3103,7 @@
__ profile_call(rsi);
}
- __ movptr(rcx_method_handle, Address(rax_callsite, __ delayed_value(java_lang_invoke_CallSite::target_offset_in_bytes, rcx)));
+ __ load_heap_oop(rcx_method_handle, Address(rax_callsite, __ delayed_value(java_lang_invoke_CallSite::target_offset_in_bytes, rcx)));
__ null_check(rcx_method_handle);
__ prepare_to_jump_from_interpreted();
__ jump_to_method_handle_entry(rcx_method_handle, rdx);
@@ -3249,7 +3249,7 @@
(int32_t)markOopDesc::prototype()); // header
__ pop(rcx); // get saved klass back in the register.
}
- __ movptr(Address(rax, oopDesc::klass_offset_in_bytes()), rcx); // klass
+ __ store_klass(rax, rcx); // klass
{
SkipIfEqual skip_if(_masm, &DTraceAllocProbes, 0);
@@ -3324,7 +3324,7 @@
__ movptr(rax, Address(rcx, rbx, Address::times_ptr, sizeof(constantPoolOopDesc)));
__ bind(resolved);
- __ movptr(rbx, Address(rdx, oopDesc::klass_offset_in_bytes()));
+ __ load_klass(rbx, rdx);
// Generate subtype check. Blows ECX. Resets EDI. Object in EDX.
// Superklass in EAX. Subklass in EBX.
@@ -3367,12 +3367,12 @@
__ push(atos);
call_VM(rax, CAST_FROM_FN_PTR(address, InterpreterRuntime::quicken_io_cc) );
__ pop_ptr(rdx);
- __ movptr(rdx, Address(rdx, oopDesc::klass_offset_in_bytes()));
+ __ load_klass(rdx, rdx);
__ jmp(resolved);
// Get superklass in EAX and subklass in EDX
__ bind(quicked);
- __ movptr(rdx, Address(rax, oopDesc::klass_offset_in_bytes()));
+ __ load_klass(rdx, rax);
__ movptr(rax, Address(rcx, rbx, Address::times_ptr, sizeof(constantPoolOopDesc)));
__ bind(resolved);
--- a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp Mon Apr 18 01:33:28 2011 -0700
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp Mon Apr 18 06:50:57 2011 -0700
@@ -427,7 +427,7 @@
Label L_done, L_throw_exception;
const Register con_klass_temp = rcx; // same as cache
const Register array_klass_temp = rdx; // same as index
- __ movptr(con_klass_temp, Address(rax, oopDesc::klass_offset_in_bytes()));
+ __ load_klass(con_klass_temp, rax);
__ lea(array_klass_temp, ExternalAddress((address)Universe::systemObjArrayKlassObj_addr()));
__ cmpptr(con_klass_temp, Address(array_klass_temp, 0));
__ jcc(Assembler::notEqual, L_done);
@@ -438,7 +438,7 @@
// Load the exception from the system-array which wraps it:
__ bind(L_throw_exception);
- __ movptr(rax, Address(rax, arrayOopDesc::base_offset_in_bytes(T_OBJECT)));
+ __ load_heap_oop(rax, Address(rax, arrayOopDesc::base_offset_in_bytes(T_OBJECT)));
__ jump(ExternalAddress(Interpreter::throw_exception_entry()));
__ bind(L_done);