211 size_t index_size) { |
211 size_t index_size) { |
212 assert(bcp_offset > 0, "bcp is still pointing to start of bytecode"); |
212 assert(bcp_offset > 0, "bcp is still pointing to start of bytecode"); |
213 if (index_size == sizeof(u2)) { |
213 if (index_size == sizeof(u2)) { |
214 load_unsigned_short(index, Address(r13, bcp_offset)); |
214 load_unsigned_short(index, Address(r13, bcp_offset)); |
215 } else if (index_size == sizeof(u4)) { |
215 } else if (index_size == sizeof(u4)) { |
216 assert(EnableInvokeDynamic, "giant index used only for EnableInvokeDynamic"); |
216 assert(EnableInvokeDynamic, "giant index used only for JSR 292"); |
217 movl(index, Address(r13, bcp_offset)); |
217 movl(index, Address(r13, bcp_offset)); |
218 // Check if the secondary index definition is still ~x, otherwise |
218 // Check if the secondary index definition is still ~x, otherwise |
219 // we have to change the following assembler code to calculate the |
219 // we have to change the following assembler code to calculate the |
220 // plain index. |
220 // plain index. |
221 assert(constantPoolCacheOopDesc::decode_secondary_index(~123) == 123, "else change next line"); |
221 assert(constantPoolCacheOopDesc::decode_secondary_index(~123) == 123, "else change next line"); |
222 notl(index); // convert to plain index |
222 notl(index); // convert to plain index |
223 } else if (index_size == sizeof(u1)) { |
223 } else if (index_size == sizeof(u1)) { |
224 assert(EnableMethodHandles, "tiny index used only for EnableMethodHandles"); |
224 assert(EnableInvokeDynamic, "tiny index used only for JSR 292"); |
225 load_unsigned_byte(index, Address(r13, bcp_offset)); |
225 load_unsigned_byte(index, Address(r13, bcp_offset)); |
226 } else { |
226 } else { |
227 ShouldNotReachHere(); |
227 ShouldNotReachHere(); |
228 } |
228 } |
229 } |
229 } |