1.1 --- a/src/cpu/x86/vm/vtableStubs_x86_32.cpp Tue Aug 26 15:49:40 2008 -0700 1.2 +++ b/src/cpu/x86/vm/vtableStubs_x86_32.cpp Wed Aug 27 00:21:55 2008 -0700 1.3 @@ -49,7 +49,7 @@ 1.4 #ifndef PRODUCT 1.5 1.6 if (CountCompiledCalls) { 1.7 - __ increment(ExternalAddress((address) SharedRuntime::nof_megamorphic_calls_addr())); 1.8 + __ incrementl(ExternalAddress((address) SharedRuntime::nof_megamorphic_calls_addr())); 1.9 } 1.10 #endif /* PRODUCT */ 1.11 1.12 @@ -58,7 +58,7 @@ 1.13 1.14 // get receiver klass 1.15 address npe_addr = __ pc(); 1.16 - __ movl(rax, Address(rcx, oopDesc::klass_offset_in_bytes())); 1.17 + __ movptr(rax, Address(rcx, oopDesc::klass_offset_in_bytes())); 1.18 // compute entry offset (in words) 1.19 int entry_offset = instanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size(); 1.20 #ifndef PRODUCT 1.21 @@ -76,12 +76,12 @@ 1.22 const Register method = rbx; 1.23 1.24 // load methodOop and target address 1.25 - __ movl(method, Address(rax, entry_offset*wordSize + vtableEntry::method_offset_in_bytes())); 1.26 + __ movptr(method, Address(rax, entry_offset*wordSize + vtableEntry::method_offset_in_bytes())); 1.27 if (DebugVtables) { 1.28 Label L; 1.29 - __ cmpl(method, NULL_WORD); 1.30 + __ cmpptr(method, (int32_t)NULL_WORD); 1.31 __ jcc(Assembler::equal, L); 1.32 - __ cmpl(Address(method, methodOopDesc::from_compiled_offset()), NULL_WORD); 1.33 + __ cmpptr(Address(method, methodOopDesc::from_compiled_offset()), (int32_t)NULL_WORD); 1.34 __ jcc(Assembler::notZero, L); 1.35 __ stop("Vtable entry is NULL"); 1.36 __ bind(L); 1.37 @@ -114,7 +114,7 @@ 1.38 1.39 #ifndef PRODUCT 1.40 if (CountCompiledCalls) { 1.41 - __ increment(ExternalAddress((address) SharedRuntime::nof_megamorphic_calls_addr())); 1.42 + __ incrementl(ExternalAddress((address) SharedRuntime::nof_megamorphic_calls_addr())); 1.43 } 1.44 #endif /* PRODUCT */ 1.45 // get receiver (need to skip return address on top of stack) 1.46 @@ -123,16 +123,16 @@ 1.47 1.48 // get receiver klass (also an implicit null-check) 1.49 address npe_addr = __ pc(); 1.50 - __ movl(rbx, Address(rcx, oopDesc::klass_offset_in_bytes())); 1.51 + __ movptr(rbx, Address(rcx, oopDesc::klass_offset_in_bytes())); 1.52 1.53 - __ movl(rsi, rbx); // Save klass in free register 1.54 + __ mov(rsi, rbx); // Save klass in free register 1.55 // Most registers are in use, so save a few 1.56 - __ pushl(rdx); 1.57 + __ push(rdx); 1.58 // compute itable entry offset (in words) 1.59 const int base = instanceKlass::vtable_start_offset() * wordSize; 1.60 assert(vtableEntry::size() * wordSize == 4, "adjust the scaling in the code below"); 1.61 __ movl(rdx, Address(rbx, instanceKlass::vtable_length_offset() * wordSize)); // Get length of vtable 1.62 - __ leal(rbx, Address(rbx, rdx, Address::times_4, base)); 1.63 + __ lea(rbx, Address(rbx, rdx, Address::times_ptr, base)); 1.64 if (HeapWordsPerLong > 1) { 1.65 // Round up to align_object_offset boundary 1.66 __ round_to(rbx, BytesPerLong); 1.67 @@ -143,16 +143,16 @@ 1.68 __ jmpb(entry); 1.69 1.70 __ bind(next); 1.71 - __ addl(rbx, itableOffsetEntry::size() * wordSize); 1.72 + __ addptr(rbx, itableOffsetEntry::size() * wordSize); 1.73 1.74 __ bind(entry); 1.75 1.76 // If the entry is NULL then we've reached the end of the table 1.77 // without finding the expected interface, so throw an exception 1.78 - __ movl(rdx, Address(rbx, itableOffsetEntry::interface_offset_in_bytes())); 1.79 - __ testl(rdx, rdx); 1.80 + __ movptr(rdx, Address(rbx, itableOffsetEntry::interface_offset_in_bytes())); 1.81 + __ testptr(rdx, rdx); 1.82 __ jcc(Assembler::zero, throw_icce); 1.83 - __ cmpl(rax, rdx); 1.84 + __ cmpptr(rax, rdx); 1.85 __ jcc(Assembler::notEqual, next); 1.86 1.87 // We found a hit, move offset into rbx, 1.88 @@ -163,10 +163,10 @@ 1.89 1.90 // Get methodOop and entrypoint for compiler 1.91 const Register method = rbx; 1.92 - __ movl(method, Address(rsi, rdx, Address::times_1, method_offset)); 1.93 + __ movptr(method, Address(rsi, rdx, Address::times_1, method_offset)); 1.94 1.95 // Restore saved register, before possible trap. 1.96 - __ popl(rdx); 1.97 + __ pop(rdx); 1.98 1.99 // method (rbx): methodOop 1.100 // rcx: receiver 1.101 @@ -174,9 +174,9 @@ 1.102 #ifdef ASSERT 1.103 if (DebugVtables) { 1.104 Label L1; 1.105 - __ cmpl(method, NULL_WORD); 1.106 + __ cmpptr(method, (int32_t)NULL_WORD); 1.107 __ jcc(Assembler::equal, L1); 1.108 - __ cmpl(Address(method, methodOopDesc::from_compiled_offset()), NULL_WORD); 1.109 + __ cmpptr(Address(method, methodOopDesc::from_compiled_offset()), (int32_t)NULL_WORD); 1.110 __ jcc(Assembler::notZero, L1); 1.111 __ stop("methodOop is null"); 1.112 __ bind(L1); 1.113 @@ -188,7 +188,7 @@ 1.114 1.115 __ bind(throw_icce); 1.116 // Restore saved register 1.117 - __ popl(rdx); 1.118 + __ pop(rdx); 1.119 __ jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry())); 1.120 1.121 masm->flush();