1.1 --- a/src/cpu/x86/vm/templateTable_x86_64.cpp Sat Oct 30 12:19:07 2010 -0700 1.2 +++ b/src/cpu/x86/vm/templateTable_x86_64.cpp Sat Oct 30 13:08:23 2010 -0700 1.3 @@ -413,6 +413,25 @@ 1.4 if (VerifyOops) { 1.5 __ verify_oop(rax); 1.6 } 1.7 + 1.8 + Label L_done, L_throw_exception; 1.9 + const Register con_klass_temp = rcx; // same as cache 1.10 + const Register array_klass_temp = rdx; // same as index 1.11 + __ movptr(con_klass_temp, Address(rax, oopDesc::klass_offset_in_bytes())); 1.12 + __ lea(array_klass_temp, ExternalAddress((address)Universe::systemObjArrayKlassObj_addr())); 1.13 + __ cmpptr(con_klass_temp, Address(array_klass_temp, 0)); 1.14 + __ jcc(Assembler::notEqual, L_done); 1.15 + __ cmpl(Address(rax, arrayOopDesc::length_offset_in_bytes()), 0); 1.16 + __ jcc(Assembler::notEqual, L_throw_exception); 1.17 + __ xorptr(rax, rax); 1.18 + __ jmp(L_done); 1.19 + 1.20 + // Load the exception from the system-array which wraps it: 1.21 + __ bind(L_throw_exception); 1.22 + __ movptr(rax, Address(rax, arrayOopDesc::base_offset_in_bytes(T_OBJECT))); 1.23 + __ jump(ExternalAddress(Interpreter::throw_exception_entry())); 1.24 + 1.25 + __ bind(L_done); 1.26 } 1.27 1.28 void TemplateTable::ldc2_w() {