Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/templateTable_x86_64.cpp @ 3275:bbe95b4337f1
7036960: TemplateTable::fast_aldc in templateTable_x86_64.cpp uses movptr instead of load_klass
Reviewed-by: kvn, iveresov
author | twisti |
---|---|
date | Mon, 18 Apr 2011 06:50:57 -0700 |
parents | 38fea01eb669 |
children | 08ccee2c4dbf |
comparison
equal
deleted
inserted
replaced
3274:2a23b1b5a0a8 | 3275: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 |