1.1 --- a/src/cpu/x86/vm/interp_masm_x86_32.cpp Tue Jun 01 11:48:33 2010 -0700 1.2 +++ b/src/cpu/x86/vm/interp_masm_x86_32.cpp Wed Jun 02 22:45:42 2010 -0700 1.3 @@ -189,11 +189,11 @@ 1.4 } 1.5 1.6 1.7 -void InterpreterMacroAssembler::get_cache_index_at_bcp(Register reg, int bcp_offset, bool giant_index) { 1.8 +void InterpreterMacroAssembler::get_cache_index_at_bcp(Register reg, int bcp_offset, size_t index_size) { 1.9 assert(bcp_offset > 0, "bcp is still pointing to start of bytecode"); 1.10 - if (!giant_index) { 1.11 + if (index_size == sizeof(u2)) { 1.12 load_unsigned_short(reg, Address(rsi, bcp_offset)); 1.13 - } else { 1.14 + } else if (index_size == sizeof(u4)) { 1.15 assert(EnableInvokeDynamic, "giant index used only for EnableInvokeDynamic"); 1.16 movl(reg, Address(rsi, bcp_offset)); 1.17 // Check if the secondary index definition is still ~x, otherwise 1.18 @@ -201,14 +201,19 @@ 1.19 // plain index. 1.20 assert(constantPoolCacheOopDesc::decode_secondary_index(~123) == 123, "else change next line"); 1.21 notl(reg); // convert to plain index 1.22 + } else if (index_size == sizeof(u1)) { 1.23 + assert(EnableMethodHandles, "tiny index used only for EnableMethodHandles"); 1.24 + load_unsigned_byte(reg, Address(rsi, bcp_offset)); 1.25 + } else { 1.26 + ShouldNotReachHere(); 1.27 } 1.28 } 1.29 1.30 1.31 void InterpreterMacroAssembler::get_cache_and_index_at_bcp(Register cache, Register index, 1.32 - int bcp_offset, bool giant_index) { 1.33 + int bcp_offset, size_t index_size) { 1.34 assert(cache != index, "must use different registers"); 1.35 - get_cache_index_at_bcp(index, bcp_offset, giant_index); 1.36 + get_cache_index_at_bcp(index, bcp_offset, index_size); 1.37 movptr(cache, Address(rbp, frame::interpreter_frame_cache_offset * wordSize)); 1.38 assert(sizeof(ConstantPoolCacheEntry) == 4*wordSize, "adjust code below"); 1.39 shlptr(index, 2); // convert from field index to ConstantPoolCacheEntry index 1.40 @@ -216,9 +221,9 @@ 1.41 1.42 1.43 void InterpreterMacroAssembler::get_cache_entry_pointer_at_bcp(Register cache, Register tmp, 1.44 - int bcp_offset, bool giant_index) { 1.45 + int bcp_offset, size_t index_size) { 1.46 assert(cache != tmp, "must use different register"); 1.47 - get_cache_index_at_bcp(tmp, bcp_offset, giant_index); 1.48 + get_cache_index_at_bcp(tmp, bcp_offset, index_size); 1.49 assert(sizeof(ConstantPoolCacheEntry) == 4*wordSize, "adjust code below"); 1.50 // convert from field index to ConstantPoolCacheEntry index 1.51 // and from word offset to byte offset