Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8026837

C1: metadata klass pointers should be of type T_METADATA

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • 9, 10
    • hotspot
    • generic
    • generic

      Currently metadata klass pointers (Klass*) are of type T_ADDRESS which is wrong; the type should be T_METADATA.

      These two types are mixed up like can be seen in SPARC's LIR_Assembler::load:

            case T_METADATA: __ ld_ptr(base, offset, to_reg->as_register()); break;
            case T_ADDRESS:
      #ifdef _LP64
              if (offset == oopDesc::klass_offset_in_bytes() && UseCompressedClassPointers) {
                __ lduw(base, offset, to_reg->as_register());
                __ decode_klass_not_null(to_reg->as_register());
              } else
      #endif
              {
                __ ld_ptr(base, offset, to_reg->as_register());
              }
              break;

      The clean-up is likely to be very intrusive are there will be a lot of places with the wrong type.

            Unassigned Unassigned
            twisti Christian Thalinger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: