src/cpu/sparc/vm/interp_masm_sparc.cpp

changeset 1934
e9ff18c4ace7
parent 1907
c18cbe5936b8
parent 1920
ab102d5d923e
child 2138
d5d065957597
     1.1 --- a/src/cpu/sparc/vm/interp_masm_sparc.cpp	Tue Jun 01 11:48:33 2010 -0700
     1.2 +++ b/src/cpu/sparc/vm/interp_masm_sparc.cpp	Wed Jun 02 22:45:42 2010 -0700
     1.3 @@ -720,25 +720,30 @@
     1.4  
     1.5  
     1.6  void InterpreterMacroAssembler::get_cache_index_at_bcp(Register cache, Register tmp,
     1.7 -                                                       int bcp_offset, bool giant_index) {
     1.8 +                                                       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      get_2_byte_integer_at_bcp(bcp_offset, cache, tmp, Unsigned);
    1.13 -  } else {
    1.14 +  } else if (index_size == sizeof(u4)) {
    1.15      assert(EnableInvokeDynamic, "giant index used only for EnableInvokeDynamic");
    1.16      get_4_byte_integer_at_bcp(bcp_offset, cache, tmp);
    1.17      assert(constantPoolCacheOopDesc::decode_secondary_index(~123) == 123, "else change next line");
    1.18      xor3(tmp, -1, tmp);  // convert to plain index
    1.19 +  } else if (index_size == sizeof(u1)) {
    1.20 +    assert(EnableMethodHandles, "tiny index used only for EnableMethodHandles");
    1.21 +    ldub(Lbcp, bcp_offset, tmp);
    1.22 +  } else {
    1.23 +    ShouldNotReachHere();
    1.24    }
    1.25  }
    1.26  
    1.27  
    1.28  void InterpreterMacroAssembler::get_cache_and_index_at_bcp(Register cache, Register tmp,
    1.29 -                                                           int bcp_offset, bool giant_index) {
    1.30 +                                                           int bcp_offset, size_t index_size) {
    1.31    assert(bcp_offset > 0, "bcp is still pointing to start of bytecode");
    1.32    assert_different_registers(cache, tmp);
    1.33    assert_not_delayed();
    1.34 -  get_cache_index_at_bcp(cache, tmp, bcp_offset, giant_index);
    1.35 +  get_cache_index_at_bcp(cache, tmp, bcp_offset, index_size);
    1.36    // convert from field index to ConstantPoolCacheEntry index and from
    1.37    // word index to byte offset
    1.38    sll(tmp, exact_log2(in_words(ConstantPoolCacheEntry::size()) * BytesPerWord), tmp);
    1.39 @@ -747,12 +752,15 @@
    1.40  
    1.41  
    1.42  void InterpreterMacroAssembler::get_cache_entry_pointer_at_bcp(Register cache, Register tmp,
    1.43 -                                                               int bcp_offset, bool giant_index) {
    1.44 +                                                               int bcp_offset, size_t index_size) {
    1.45    assert(bcp_offset > 0, "bcp is still pointing to start of bytecode");
    1.46    assert_different_registers(cache, tmp);
    1.47    assert_not_delayed();
    1.48 -  assert(!giant_index,"NYI");
    1.49 -  get_2_byte_integer_at_bcp(bcp_offset, cache, tmp, Unsigned);
    1.50 +  if (index_size == sizeof(u2)) {
    1.51 +    get_2_byte_integer_at_bcp(bcp_offset, cache, tmp, Unsigned);
    1.52 +  } else {
    1.53 +    ShouldNotReachHere();  // other sizes not supported here
    1.54 +  }
    1.55                // convert from field index to ConstantPoolCacheEntry index
    1.56                // and from word index to byte offset
    1.57    sll(tmp, exact_log2(in_words(ConstantPoolCacheEntry::size()) * BytesPerWord), tmp);

mercurial