src/cpu/x86/vm/templateTable_x86_64.cpp

changeset 2807
bbe95b4337f1
parent 2698
38fea01eb669
child 2811
08ccee2c4dbf
equal deleted inserted replaced
2806:2a23b1b5a0a8 2807:bbe95b4337f1
425 } 425 }
426 426
427 Label L_done, L_throw_exception; 427 Label L_done, L_throw_exception;
428 const Register con_klass_temp = rcx; // same as cache 428 const Register con_klass_temp = rcx; // same as cache
429 const Register array_klass_temp = rdx; // same as index 429 const Register array_klass_temp = rdx; // same as index
430 __ movptr(con_klass_temp, Address(rax, oopDesc::klass_offset_in_bytes())); 430 __ load_klass(con_klass_temp, rax);
431 __ lea(array_klass_temp, ExternalAddress((address)Universe::systemObjArrayKlassObj_addr())); 431 __ lea(array_klass_temp, ExternalAddress((address)Universe::systemObjArrayKlassObj_addr()));
432 __ cmpptr(con_klass_temp, Address(array_klass_temp, 0)); 432 __ cmpptr(con_klass_temp, Address(array_klass_temp, 0));
433 __ jcc(Assembler::notEqual, L_done); 433 __ jcc(Assembler::notEqual, L_done);
434 __ cmpl(Address(rax, arrayOopDesc::length_offset_in_bytes()), 0); 434 __ cmpl(Address(rax, arrayOopDesc::length_offset_in_bytes()), 0);
435 __ jcc(Assembler::notEqual, L_throw_exception); 435 __ jcc(Assembler::notEqual, L_throw_exception);
436 __ xorptr(rax, rax); 436 __ xorptr(rax, rax);
437 __ jmp(L_done); 437 __ jmp(L_done);
438 438
439 // Load the exception from the system-array which wraps it: 439 // Load the exception from the system-array which wraps it:
440 __ bind(L_throw_exception); 440 __ bind(L_throw_exception);
441 __ movptr(rax, Address(rax, arrayOopDesc::base_offset_in_bytes(T_OBJECT))); 441 __ load_heap_oop(rax, Address(rax, arrayOopDesc::base_offset_in_bytes(T_OBJECT)));
442 __ jump(ExternalAddress(Interpreter::throw_exception_entry())); 442 __ jump(ExternalAddress(Interpreter::throw_exception_entry()));
443 443
444 __ bind(L_done); 444 __ bind(L_done);
445 } 445 }
446 446

mercurial