< prev index next >

src/hotspot/cpu/x86/templateTable_x86.cpp

Print this page




2648                                               bool is_static = false) {
2649   assert_different_registers(cache, index, flags, off);
2650 
2651   ByteSize cp_base_offset = ConstantPoolCache::base_offset();
2652   // Field offset
2653   __ movptr(off, Address(cache, index, Address::times_ptr,
2654                          in_bytes(cp_base_offset +
2655                                   ConstantPoolCacheEntry::f2_offset())));
2656   // Flags
2657   __ movl(flags, Address(cache, index, Address::times_ptr,
2658                          in_bytes(cp_base_offset +
2659                                   ConstantPoolCacheEntry::flags_offset())));
2660 
2661   // klass overwrite register
2662   if (is_static) {
2663     __ movptr(obj, Address(cache, index, Address::times_ptr,
2664                            in_bytes(cp_base_offset +
2665                                     ConstantPoolCacheEntry::f1_offset())));
2666     const int mirror_offset = in_bytes(Klass::java_mirror_offset());
2667     __ movptr(obj, Address(obj, mirror_offset));

2668   }
2669 }
2670 
2671 void TemplateTable::load_invoke_cp_cache_entry(int byte_no,
2672                                                Register method,
2673                                                Register itable_index,
2674                                                Register flags,
2675                                                bool is_invokevirtual,
2676                                                bool is_invokevfinal, /*unused*/
2677                                                bool is_invokedynamic) {
2678   // setup registers
2679   const Register cache = rcx;
2680   const Register index = rdx;
2681   assert_different_registers(method, flags);
2682   assert_different_registers(method, cache, index);
2683   assert_different_registers(itable_index, flags);
2684   assert_different_registers(itable_index, cache, index);
2685   // determine constant pool cache field offsets
2686   assert(is_invokevirtual == (byte_no == f2_byte), "is_invokevirtual flag redundant");
2687   const int method_offset = in_bytes(




2648                                               bool is_static = false) {
2649   assert_different_registers(cache, index, flags, off);
2650 
2651   ByteSize cp_base_offset = ConstantPoolCache::base_offset();
2652   // Field offset
2653   __ movptr(off, Address(cache, index, Address::times_ptr,
2654                          in_bytes(cp_base_offset +
2655                                   ConstantPoolCacheEntry::f2_offset())));
2656   // Flags
2657   __ movl(flags, Address(cache, index, Address::times_ptr,
2658                          in_bytes(cp_base_offset +
2659                                   ConstantPoolCacheEntry::flags_offset())));
2660 
2661   // klass overwrite register
2662   if (is_static) {
2663     __ movptr(obj, Address(cache, index, Address::times_ptr,
2664                            in_bytes(cp_base_offset +
2665                                     ConstantPoolCacheEntry::f1_offset())));
2666     const int mirror_offset = in_bytes(Klass::java_mirror_offset());
2667     __ movptr(obj, Address(obj, mirror_offset));
2668     __ resolve_oop_handle(obj);
2669   }
2670 }
2671 
2672 void TemplateTable::load_invoke_cp_cache_entry(int byte_no,
2673                                                Register method,
2674                                                Register itable_index,
2675                                                Register flags,
2676                                                bool is_invokevirtual,
2677                                                bool is_invokevfinal, /*unused*/
2678                                                bool is_invokedynamic) {
2679   // setup registers
2680   const Register cache = rcx;
2681   const Register index = rdx;
2682   assert_different_registers(method, flags);
2683   assert_different_registers(method, cache, index);
2684   assert_different_registers(itable_index, flags);
2685   assert_different_registers(itable_index, cache, index);
2686   // determine constant pool cache field offsets
2687   assert(is_invokevirtual == (byte_no == f2_byte), "is_invokevirtual flag redundant");
2688   const int method_offset = in_bytes(


< prev index next >