hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp
void InterpreterMacroAssembler::get_cache_index_at_bcp(Register index,
int bcp_offset,
size_t index_size) {
{- -------------------------------------------
(1) (assert)
---------------------------------------- -}
assert(bcp_offset > 0, "bcp is still pointing to start of bytecode");
{- -------------------------------------------
(1) コード生成:
「バイトコード命令中に埋め込まれている index 情報を取得する」
(なお, 引数で指定された大きさ(index_size) に応じて, 適切な大きさ分だけロードするコードを生成)
---------------------------------------- -}
if (index_size == sizeof(u2)) {
load_unsigned_short(index, Address(r13, bcp_offset));
} else if (index_size == sizeof(u4)) {
assert(EnableInvokeDynamic, "giant index used only for JSR 292");
movl(index, Address(r13, bcp_offset));
// Check if the secondary index definition is still ~x, otherwise
// we have to change the following assembler code to calculate the
// plain index.
assert(constantPoolCacheOopDesc::decode_secondary_index(~123) == 123, "else change next line");
notl(index); // convert to plain index
} else if (index_size == sizeof(u1)) {
assert(EnableInvokeDynamic, "tiny index used only for JSR 292");
load_unsigned_byte(index, Address(r13, bcp_offset));
} else {
ShouldNotReachHere();
}
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.