comparison src/cpu/x86/vm/assembler_x86.cpp @ 665:c89f86385056

6814659: separable cleanups and subroutines for 6655638 Summary: preparatory but separable changes for method handles Reviewed-by: kvn, never
author jrose
date Fri, 20 Mar 2009 23:19:36 -0700
parents bd441136a5ce
children d0994e5bebce
comparison
equal deleted inserted replaced
647:bd441136a5ce 665:c89f86385056
7216 // The receiver klass is in recv_klass. 7216 // The receiver klass is in recv_klass.
7217 // On success, the result will be in method_result, and execution falls through. 7217 // On success, the result will be in method_result, and execution falls through.
7218 // On failure, execution transfers to the given label. 7218 // On failure, execution transfers to the given label.
7219 void MacroAssembler::lookup_interface_method(Register recv_klass, 7219 void MacroAssembler::lookup_interface_method(Register recv_klass,
7220 Register intf_klass, 7220 Register intf_klass,
7221 RegisterConstant itable_index, 7221 RegisterOrConstant itable_index,
7222 Register method_result, 7222 Register method_result,
7223 Register scan_temp, 7223 Register scan_temp,
7224 Label& L_no_such_interface) { 7224 Label& L_no_such_interface) {
7225 assert_different_registers(recv_klass, intf_klass, method_result, scan_temp); 7225 assert_different_registers(recv_klass, intf_klass, method_result, scan_temp);
7226 assert(itable_index.is_constant() || itable_index.as_register() == method_result, 7226 assert(itable_index.is_constant() || itable_index.as_register() == method_result,
7301 Register super_klass, 7301 Register super_klass,
7302 Register temp_reg, 7302 Register temp_reg,
7303 Label* L_success, 7303 Label* L_success,
7304 Label* L_failure, 7304 Label* L_failure,
7305 Label* L_slow_path, 7305 Label* L_slow_path,
7306 RegisterConstant super_check_offset) { 7306 RegisterOrConstant super_check_offset) {
7307 assert_different_registers(sub_klass, super_klass, temp_reg); 7307 assert_different_registers(sub_klass, super_klass, temp_reg);
7308 bool must_load_sco = (super_check_offset.constant_or_zero() == -1); 7308 bool must_load_sco = (super_check_offset.constant_or_zero() == -1);
7309 if (super_check_offset.is_register()) { 7309 if (super_check_offset.is_register()) {
7310 assert_different_registers(sub_klass, super_klass, 7310 assert_different_registers(sub_klass, super_klass,
7311 super_check_offset.as_register()); 7311 super_check_offset.as_register());
7350 7350
7351 // Check the supertype display: 7351 // Check the supertype display:
7352 if (must_load_sco) { 7352 if (must_load_sco) {
7353 // Positive movl does right thing on LP64. 7353 // Positive movl does right thing on LP64.
7354 movl(temp_reg, super_check_offset_addr); 7354 movl(temp_reg, super_check_offset_addr);
7355 super_check_offset = RegisterConstant(temp_reg); 7355 super_check_offset = RegisterOrConstant(temp_reg);
7356 } 7356 }
7357 Address super_check_addr(sub_klass, super_check_offset, Address::times_1, 0); 7357 Address super_check_addr(sub_klass, super_check_offset, Address::times_1, 0);
7358 cmpptr(super_klass, super_check_addr); // load displayed supertype 7358 cmpptr(super_klass, super_check_addr); // load displayed supertype
7359 7359
7360 // This check has worked decisively for primary supers. 7360 // This check has worked decisively for primary supers.
7548 movptr(rax, ExternalAddress(StubRoutines::verify_oop_subroutine_entry_address())); 7548 movptr(rax, ExternalAddress(StubRoutines::verify_oop_subroutine_entry_address()));
7549 call(rax); 7549 call(rax);
7550 } 7550 }
7551 7551
7552 7552
7553 RegisterConstant MacroAssembler::delayed_value(intptr_t* delayed_value_addr, 7553 RegisterOrConstant MacroAssembler::delayed_value_impl(intptr_t* delayed_value_addr,
7554 Register tmp, 7554 Register tmp,
7555 int offset) { 7555 int offset) {
7556 intptr_t value = *delayed_value_addr; 7556 intptr_t value = *delayed_value_addr;
7557 if (value != 0) 7557 if (value != 0)
7558 return RegisterConstant(value + offset); 7558 return RegisterOrConstant(value + offset);
7559 7559
7560 // load indirectly to solve generation ordering problem 7560 // load indirectly to solve generation ordering problem
7561 movptr(tmp, ExternalAddress((address) delayed_value_addr)); 7561 movptr(tmp, ExternalAddress((address) delayed_value_addr));
7562 7562
7563 #ifdef ASSERT 7563 #ifdef ASSERT
7569 #endif 7569 #endif
7570 7570
7571 if (offset != 0) 7571 if (offset != 0)
7572 addptr(tmp, offset); 7572 addptr(tmp, offset);
7573 7573
7574 return RegisterConstant(tmp); 7574 return RegisterOrConstant(tmp);
7575 } 7575 }
7576 7576
7577 7577
7578 void MacroAssembler::verify_oop_addr(Address addr, const char* s) { 7578 void MacroAssembler::verify_oop_addr(Address addr, const char* s) {
7579 if (!VerifyOops) return; 7579 if (!VerifyOops) return;