Mercurial > hg > graal-compiler
comparison src/cpu/x86/vm/assembler_x86.cpp @ 3938:e6b1331a51d2
7086585: make Java field injection more flexible
Reviewed-by: jrose, twisti, kvn, coleenp
author | never |
---|---|
date | Sat, 10 Sep 2011 17:29:02 -0700 |
parents | a594deb1d6dc |
children | 59bc0d4d9ea3 |
comparison
equal
deleted
inserted
replaced
3937:c565834fb592 | 3938:e6b1331a51d2 |
---|---|
8002 // method handle's MethodType. This macro hides the distinction. | 8002 // method handle's MethodType. This macro hides the distinction. |
8003 void MacroAssembler::load_method_handle_vmslots(Register vmslots_reg, Register mh_reg, | 8003 void MacroAssembler::load_method_handle_vmslots(Register vmslots_reg, Register mh_reg, |
8004 Register temp_reg) { | 8004 Register temp_reg) { |
8005 assert_different_registers(vmslots_reg, mh_reg, temp_reg); | 8005 assert_different_registers(vmslots_reg, mh_reg, temp_reg); |
8006 // load mh.type.form.vmslots | 8006 // load mh.type.form.vmslots |
8007 if (java_lang_invoke_MethodHandle::vmslots_offset_in_bytes() != 0) { | 8007 Register temp2_reg = vmslots_reg; |
8008 // hoist vmslots into every mh to avoid dependent load chain | 8008 load_heap_oop(temp2_reg, Address(mh_reg, delayed_value(java_lang_invoke_MethodHandle::type_offset_in_bytes, temp_reg))); |
8009 movl(vmslots_reg, Address(mh_reg, delayed_value(java_lang_invoke_MethodHandle::vmslots_offset_in_bytes, temp_reg))); | 8009 load_heap_oop(temp2_reg, Address(temp2_reg, delayed_value(java_lang_invoke_MethodType::form_offset_in_bytes, temp_reg))); |
8010 } else { | 8010 movl(vmslots_reg, Address(temp2_reg, delayed_value(java_lang_invoke_MethodTypeForm::vmslots_offset_in_bytes, temp_reg))); |
8011 Register temp2_reg = vmslots_reg; | |
8012 load_heap_oop(temp2_reg, Address(mh_reg, delayed_value(java_lang_invoke_MethodHandle::type_offset_in_bytes, temp_reg))); | |
8013 load_heap_oop(temp2_reg, Address(temp2_reg, delayed_value(java_lang_invoke_MethodType::form_offset_in_bytes, temp_reg))); | |
8014 movl(vmslots_reg, Address(temp2_reg, delayed_value(java_lang_invoke_MethodTypeForm::vmslots_offset_in_bytes, temp_reg))); | |
8015 } | |
8016 } | 8011 } |
8017 | 8012 |
8018 | 8013 |
8019 // registers on entry: | 8014 // registers on entry: |
8020 // - rcx: method handle | 8015 // - rcx: method handle |