1.1 --- a/src/cpu/x86/vm/vtableStubs_x86_64.cpp Tue Aug 26 15:49:40 2008 -0700 1.2 +++ b/src/cpu/x86/vm/vtableStubs_x86_64.cpp Wed Aug 27 00:21:55 2008 -0700 1.3 @@ -79,14 +79,14 @@ 1.4 // load methodOop and target address 1.5 const Register method = rbx; 1.6 1.7 - __ movq(method, Address(rax, 1.8 - entry_offset * wordSize + 1.9 - vtableEntry::method_offset_in_bytes())); 1.10 + __ movptr(method, Address(rax, 1.11 + entry_offset * wordSize + 1.12 + vtableEntry::method_offset_in_bytes())); 1.13 if (DebugVtables) { 1.14 Label L; 1.15 - __ cmpq(method, (int)NULL); 1.16 + __ cmpptr(method, (int32_t)NULL_WORD); 1.17 __ jcc(Assembler::equal, L); 1.18 - __ cmpq(Address(method, methodOopDesc::from_compiled_offset()), (int)NULL_WORD); 1.19 + __ cmpptr(Address(method, methodOopDesc::from_compiled_offset()), (int32_t)NULL_WORD); 1.20 __ jcc(Assembler::notZero, L); 1.21 __ stop("Vtable entry is NULL"); 1.22 __ bind(L); 1.23 @@ -138,7 +138,7 @@ 1.24 // when there are mistakes in this assembly code that could generate 1.25 // a spurious fault. Ask me how I know... 1.26 1.27 - __ pushq(j_rarg1); // Most registers are in use, so save one 1.28 + __ push(j_rarg1); // Most registers are in use, so save one 1.29 1.30 // compute itable entry offset (in words) 1.31 const int base = instanceKlass::vtable_start_offset() * wordSize; 1.32 @@ -147,27 +147,27 @@ 1.33 // Get length of vtable 1.34 __ movl(j_rarg1, 1.35 Address(rbx, instanceKlass::vtable_length_offset() * wordSize)); 1.36 - __ leaq(rbx, Address(rbx, j_rarg1, Address::times_8, base)); 1.37 + __ lea(rbx, Address(rbx, j_rarg1, Address::times_8, base)); 1.38 1.39 if (HeapWordsPerLong > 1) { 1.40 // Round up to align_object_offset boundary 1.41 - __ round_to_q(rbx, BytesPerLong); 1.42 + __ round_to(rbx, BytesPerLong); 1.43 } 1.44 Label hit, next, entry, throw_icce; 1.45 1.46 __ jmpb(entry); 1.47 1.48 __ bind(next); 1.49 - __ addq(rbx, itableOffsetEntry::size() * wordSize); 1.50 + __ addptr(rbx, itableOffsetEntry::size() * wordSize); 1.51 1.52 __ bind(entry); 1.53 1.54 // If the entry is NULL then we've reached the end of the table 1.55 // without finding the expected interface, so throw an exception 1.56 - __ movq(j_rarg1, Address(rbx, itableOffsetEntry::interface_offset_in_bytes())); 1.57 - __ testq(j_rarg1, j_rarg1); 1.58 + __ movptr(j_rarg1, Address(rbx, itableOffsetEntry::interface_offset_in_bytes())); 1.59 + __ testptr(j_rarg1, j_rarg1); 1.60 __ jcc(Assembler::zero, throw_icce); 1.61 - __ cmpq(rax, j_rarg1); 1.62 + __ cmpptr(rax, j_rarg1); 1.63 __ jccb(Assembler::notEqual, next); 1.64 1.65 // We found a hit, move offset into j_rarg1 1.66 @@ -184,10 +184,10 @@ 1.67 __ load_klass(rax, j_rarg0); 1.68 1.69 const Register method = rbx; 1.70 - __ movq(method, Address(rax, j_rarg1, Address::times_1, method_offset)); 1.71 + __ movptr(method, Address(rax, j_rarg1, Address::times_1, method_offset)); 1.72 1.73 // Restore saved register, before possible trap. 1.74 - __ popq(j_rarg1); 1.75 + __ pop(j_rarg1); 1.76 1.77 // method (rbx): methodOop 1.78 // j_rarg0: receiver 1.79 @@ -196,9 +196,9 @@ 1.80 #ifdef ASSERT 1.81 if (DebugVtables) { 1.82 Label L2; 1.83 - __ cmpq(method, (int)NULL); 1.84 + __ cmpptr(method, (int32_t)NULL_WORD); 1.85 __ jcc(Assembler::equal, L2); 1.86 - __ cmpq(Address(method, methodOopDesc::from_compiled_offset()), (int)NULL_WORD); 1.87 + __ cmpptr(Address(method, methodOopDesc::from_compiled_offset()), (int32_t)NULL_WORD); 1.88 __ jcc(Assembler::notZero, L2); 1.89 __ stop("compiler entrypoint is null"); 1.90 __ bind(L2); 1.91 @@ -212,7 +212,7 @@ 1.92 1.93 __ bind(throw_icce); 1.94 // Restore saved register 1.95 - __ popq(j_rarg1); 1.96 + __ pop(j_rarg1); 1.97 __ jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry())); 1.98 1.99 __ flush();