hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp
changeset 8883 5569135acca3
parent 7889 02144432d0e1
child 9437 9981851b4b8c
equal deleted inserted replaced
8882:f852635a6383 8883:5569135acca3
   213 void InterpreterMacroAssembler::get_cache_index_at_bcp(Register reg, int bcp_offset, size_t index_size) {
   213 void InterpreterMacroAssembler::get_cache_index_at_bcp(Register reg, int bcp_offset, size_t index_size) {
   214   assert(bcp_offset > 0, "bcp is still pointing to start of bytecode");
   214   assert(bcp_offset > 0, "bcp is still pointing to start of bytecode");
   215   if (index_size == sizeof(u2)) {
   215   if (index_size == sizeof(u2)) {
   216     load_unsigned_short(reg, Address(rsi, bcp_offset));
   216     load_unsigned_short(reg, Address(rsi, bcp_offset));
   217   } else if (index_size == sizeof(u4)) {
   217   } else if (index_size == sizeof(u4)) {
   218     assert(EnableInvokeDynamic, "giant index used only for EnableInvokeDynamic");
   218     assert(EnableInvokeDynamic, "giant index used only for JSR 292");
   219     movl(reg, Address(rsi, bcp_offset));
   219     movl(reg, Address(rsi, bcp_offset));
   220     // Check if the secondary index definition is still ~x, otherwise
   220     // Check if the secondary index definition is still ~x, otherwise
   221     // we have to change the following assembler code to calculate the
   221     // we have to change the following assembler code to calculate the
   222     // plain index.
   222     // plain index.
   223     assert(constantPoolCacheOopDesc::decode_secondary_index(~123) == 123, "else change next line");
   223     assert(constantPoolCacheOopDesc::decode_secondary_index(~123) == 123, "else change next line");
   224     notl(reg);  // convert to plain index
   224     notl(reg);  // convert to plain index
   225   } else if (index_size == sizeof(u1)) {
   225   } else if (index_size == sizeof(u1)) {
   226     assert(EnableMethodHandles, "tiny index used only for EnableMethodHandles");
   226     assert(EnableInvokeDynamic, "tiny index used only for JSR 292");
   227     load_unsigned_byte(reg, Address(rsi, bcp_offset));
   227     load_unsigned_byte(reg, Address(rsi, bcp_offset));
   228   } else {
   228   } else {
   229     ShouldNotReachHere();
   229     ShouldNotReachHere();
   230   }
   230   }
   231 }
   231 }