src/cpu/x86/vm/interp_masm_x86_64.cpp

changeset 1934
e9ff18c4ace7
parent 1907
c18cbe5936b8
parent 1920
ab102d5d923e
child 2138
d5d065957597
     1.1 --- a/src/cpu/x86/vm/interp_masm_x86_64.cpp	Tue Jun 01 11:48:33 2010 -0700
     1.2 +++ b/src/cpu/x86/vm/interp_masm_x86_64.cpp	Wed Jun 02 22:45:42 2010 -0700
     1.3 @@ -187,11 +187,11 @@
     1.4  
     1.5  void InterpreterMacroAssembler::get_cache_index_at_bcp(Register index,
     1.6                                                         int bcp_offset,
     1.7 -                                                       bool giant_index) {
     1.8 +                                                       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(index, Address(r13, 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(index, Address(r13, bcp_offset));
    1.17      // Check if the secondary index definition is still ~x, otherwise
    1.18 @@ -199,6 +199,11 @@
    1.19      // plain index.
    1.20      assert(constantPoolCacheOopDesc::decode_secondary_index(~123) == 123, "else change next line");
    1.21      notl(index);  // 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(index, Address(r13, bcp_offset));
    1.25 +  } else {
    1.26 +    ShouldNotReachHere();
    1.27    }
    1.28  }
    1.29  
    1.30 @@ -206,9 +211,9 @@
    1.31  void InterpreterMacroAssembler::get_cache_and_index_at_bcp(Register cache,
    1.32                                                             Register index,
    1.33                                                             int bcp_offset,
    1.34 -                                                           bool giant_index) {
    1.35 +                                                           size_t index_size) {
    1.36    assert(cache != index, "must use different registers");
    1.37 -  get_cache_index_at_bcp(index, bcp_offset, giant_index);
    1.38 +  get_cache_index_at_bcp(index, bcp_offset, index_size);
    1.39    movptr(cache, Address(rbp, frame::interpreter_frame_cache_offset * wordSize));
    1.40    assert(sizeof(ConstantPoolCacheEntry) == 4 * wordSize, "adjust code below");
    1.41    // convert from field index to ConstantPoolCacheEntry index
    1.42 @@ -219,9 +224,9 @@
    1.43  void InterpreterMacroAssembler::get_cache_entry_pointer_at_bcp(Register cache,
    1.44                                                                 Register tmp,
    1.45                                                                 int bcp_offset,
    1.46 -                                                               bool giant_index) {
    1.47 +                                                               size_t index_size) {
    1.48    assert(cache != tmp, "must use different register");
    1.49 -  get_cache_index_at_bcp(tmp, bcp_offset, giant_index);
    1.50 +  get_cache_index_at_bcp(tmp, bcp_offset, index_size);
    1.51    assert(sizeof(ConstantPoolCacheEntry) == 4 * wordSize, "adjust code below");
    1.52    // convert from field index to ConstantPoolCacheEntry index
    1.53    // and from word offset to byte offset

mercurial