comparison src/cpu/x86/vm/vtableStubs_x86_32.cpp @ 16:f8236e79048a

6664627: Merge changes made only in hotspot 11 forward to jdk 7 Reviewed-by: jcoomes
author dcubed
date Wed, 05 Dec 2007 09:00:00 -0800
parents a61af66fc99e
children dc7f315e41f7
comparison
equal deleted inserted replaced
1:92489cdc94d1 16:f8236e79048a
136 if (HeapWordsPerLong > 1) { 136 if (HeapWordsPerLong > 1) {
137 // Round up to align_object_offset boundary 137 // Round up to align_object_offset boundary
138 __ round_to(rbx, BytesPerLong); 138 __ round_to(rbx, BytesPerLong);
139 } 139 }
140 140
141 Label hit, next, entry; 141 Label hit, next, entry, throw_icce;
142 142
143 __ jmp(entry); 143 __ jmpb(entry);
144 144
145 __ bind(next); 145 __ bind(next);
146 __ addl(rbx, itableOffsetEntry::size() * wordSize); 146 __ addl(rbx, itableOffsetEntry::size() * wordSize);
147 147
148 __ bind(entry); 148 __ bind(entry);
149 149
150 #ifdef ASSERT 150 // If the entry is NULL then we've reached the end of the table
151 // Check that the entry is non-null 151 // without finding the expected interface, so throw an exception
152 if (DebugVtables) { 152 __ movl(rdx, Address(rbx, itableOffsetEntry::interface_offset_in_bytes()));
153 Label L; 153 __ testl(rdx, rdx);
154 __ pushl(rbx); 154 __ jcc(Assembler::zero, throw_icce);
155 __ movl(rbx, Address(rbx, itableOffsetEntry::interface_offset_in_bytes())); 155 __ cmpl(rax, rdx);
156 __ testl(rbx, rbx);
157 __ jcc(Assembler::notZero, L);
158 __ stop("null entry point found in itable's offset table");
159 __ bind(L);
160 __ popl(rbx);
161 }
162 #endif
163 __ cmpl(rax, Address(rbx, itableOffsetEntry::interface_offset_in_bytes()));
164 __ jcc(Assembler::notEqual, next); 156 __ jcc(Assembler::notEqual, next);
165 157
166 // We found a hit, move offset into rbx, 158 // We found a hit, move offset into rbx,
167 __ movl(rdx, Address(rbx, itableOffsetEntry::offset_offset_in_bytes())); 159 __ movl(rdx, Address(rbx, itableOffsetEntry::offset_offset_in_bytes()));
168 160
192 #endif // ASSERT 184 #endif // ASSERT
193 185
194 address ame_addr = __ pc(); 186 address ame_addr = __ pc();
195 __ jmp(Address(method, methodOopDesc::from_compiled_offset())); 187 __ jmp(Address(method, methodOopDesc::from_compiled_offset()));
196 188
189 __ bind(throw_icce);
190 // Restore saved register
191 __ popl(rdx);
192 __ jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry()));
193
197 masm->flush(); 194 masm->flush();
195
196 guarantee(__ pc() <= s->code_end(), "overflowed buffer");
197
198 s->set_exception_points(npe_addr, ame_addr); 198 s->set_exception_points(npe_addr, ame_addr);
199 return s; 199 return s;
200 } 200 }
201 201
202 202
205 if (is_vtable_stub) { 205 if (is_vtable_stub) {
206 // Vtable stub size 206 // Vtable stub size
207 return (DebugVtables ? 210 : 16) + (CountCompiledCalls ? 6 : 0); 207 return (DebugVtables ? 210 : 16) + (CountCompiledCalls ? 6 : 0);
208 } else { 208 } else {
209 // Itable stub size 209 // Itable stub size
210 return (DebugVtables ? 140 : 55) + (CountCompiledCalls ? 6 : 0); 210 return (DebugVtables ? 144 : 64) + (CountCompiledCalls ? 6 : 0);
211 } 211 }
212 } 212 }
213 213
214 int VtableStub::pd_code_alignment() { 214 int VtableStub::pd_code_alignment() {
215 return wordSize; 215 return wordSize;