src/share/vm/opto/machnode.cpp

changeset 651
8d191a7697e2
parent 548
ba764ed4b6f2
child 656
1e026f8da827
     1.1 --- a/src/share/vm/opto/machnode.cpp	Fri Jun 20 10:17:09 2008 -0700
     1.2 +++ b/src/share/vm/opto/machnode.cpp	Fri Jun 20 11:10:05 2008 -0700
     1.3 @@ -262,14 +262,16 @@
     1.4      // Now we have collected every part of the ADLC MEMORY_INTER.
     1.5      // See if it adds up to a base + offset.
     1.6      if (index != NULL) {
     1.7 -      if (!index->is_Con()) {
     1.8 -        const TypeNarrowOop* narrowoop = index->bottom_type()->isa_narrowoop();
     1.9 -        if (narrowoop != NULL) {
    1.10 -          // Memory references through narrow oops have a
    1.11 -          // funny base so grab the type from the index.
    1.12 -          adr_type = narrowoop->make_oopptr();
    1.13 -          return NULL;
    1.14 -        }
    1.15 +      const TypeNarrowOop* narrowoop = index->bottom_type()->isa_narrowoop();
    1.16 +      if (narrowoop != NULL) { // EncodeN, LoadN, LoadConN, LoadNKlass.
    1.17 +        // Memory references through narrow oops have a
    1.18 +        // funny base so grab the type from the index:
    1.19 +        // [R12 + narrow_oop_reg<<3 + offset]
    1.20 +        assert(base == NULL, "Memory references through narrow oops have no base");
    1.21 +        offset = disp;
    1.22 +        adr_type = narrowoop->make_oopptr()->add_offset(offset);
    1.23 +        return NULL;
    1.24 +      } else if (!index->is_Con()) {
    1.25          disp = Type::OffsetBot;
    1.26        } else if (disp != Type::OffsetBot) {
    1.27          const TypeX* ti = index->bottom_type()->isa_intptr_t();

mercurial