src/share/vm/opto/machnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8014189 Sdiff src/share/vm/opto

src/share/vm/opto/machnode.cpp

Print this page




 332   // would let Intel load from static globals in 1 instruction.
 333   // Currently Intel requires 2 instructions and a register temp.
 334   if (base == NULL) {
 335     // NULL base, zero offset means no memory at all (a null pointer!)
 336     if (offset == 0) {
 337       return NULL;
 338     }
 339     // NULL base, any offset means any pointer whatever
 340     if (offset == Type::OffsetBot) {
 341       return TypePtr::BOTTOM;
 342     }
 343     // %%% make offset be intptr_t
 344     assert(!Universe::heap()->is_in_reserved((oop)offset), "must be a raw ptr");
 345     return TypeRawPtr::BOTTOM;
 346   }
 347 
 348   // base of -1 with no particular offset means all of memory
 349   if (base == NodeSentinel)  return TypePtr::BOTTOM;
 350 
 351   const Type* t = base->bottom_type();
 352   if (UseCompressedOops && Universe::narrow_oop_shift() == 0) {
 353     // 32-bit unscaled narrow oop can be the base of any address expression
 354     t = t->make_ptr();
 355   }
 356   if (UseCompressedKlassPointers && Universe::narrow_klass_shift() == 0) {
 357     // 32-bit unscaled narrow oop can be the base of any address expression
 358     t = t->make_ptr();
 359   }
 360   if (t->isa_intptr_t() && offset != 0 && offset != Type::OffsetBot) {
 361     // We cannot assert that the offset does not look oop-ish here.
 362     // Depending on the heap layout the cardmark base could land
 363     // inside some oopish region.  It definitely does for Win2K.
 364     // The sum of cardmark-base plus shift-by-9-oop lands outside
 365     // the oop-ish area but we can't assert for that statically.
 366     return TypeRawPtr::BOTTOM;
 367   }
 368 
 369   const TypePtr *tp = t->isa_ptr();
 370 
 371   // be conservative if we do not recognize the type
 372   if (tp == NULL) {
 373     assert(false, "this path may produce not optimal code");
 374     return TypePtr::BOTTOM;
 375   }
 376   assert(tp->base() != Type::AnyPtr, "not a bare pointer");




 332   // would let Intel load from static globals in 1 instruction.
 333   // Currently Intel requires 2 instructions and a register temp.
 334   if (base == NULL) {
 335     // NULL base, zero offset means no memory at all (a null pointer!)
 336     if (offset == 0) {
 337       return NULL;
 338     }
 339     // NULL base, any offset means any pointer whatever
 340     if (offset == Type::OffsetBot) {
 341       return TypePtr::BOTTOM;
 342     }
 343     // %%% make offset be intptr_t
 344     assert(!Universe::heap()->is_in_reserved((oop)offset), "must be a raw ptr");
 345     return TypeRawPtr::BOTTOM;
 346   }
 347 
 348   // base of -1 with no particular offset means all of memory
 349   if (base == NodeSentinel)  return TypePtr::BOTTOM;
 350 
 351   const Type* t = base->bottom_type();
 352   if (t->isa_narrowoop() && Universe::narrow_oop_shift() == 0) {
 353     // 32-bit unscaled narrow oop can be the base of any address expression
 354     t = t->make_ptr();
 355   }
 356   if (t->isa_narrowklass() && Universe::narrow_klass_shift() == 0) {
 357     // 32-bit unscaled narrow oop can be the base of any address expression
 358     t = t->make_ptr();
 359   }
 360   if (t->isa_intptr_t() && offset != 0 && offset != Type::OffsetBot) {
 361     // We cannot assert that the offset does not look oop-ish here.
 362     // Depending on the heap layout the cardmark base could land
 363     // inside some oopish region.  It definitely does for Win2K.
 364     // The sum of cardmark-base plus shift-by-9-oop lands outside
 365     // the oop-ish area but we can't assert for that statically.
 366     return TypeRawPtr::BOTTOM;
 367   }
 368 
 369   const TypePtr *tp = t->isa_ptr();
 370 
 371   // be conservative if we do not recognize the type
 372   if (tp == NULL) {
 373     assert(false, "this path may produce not optimal code");
 374     return TypePtr::BOTTOM;
 375   }
 376   assert(tp->base() != Type::AnyPtr, "not a bare pointer");


src/share/vm/opto/machnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File