Mercurial > hg > truffle
comparison src/share/vm/opto/machnode.cpp @ 6848:8e47bac5643a
7054512: Compress class pointers after perm gen removal
Summary: support of compress class pointers in the compilers.
Reviewed-by: kvn, twisti
author | roland |
---|---|
date | Tue, 09 Oct 2012 10:11:38 +0200 |
parents | da91efe96a93 |
children | a7114d3d712e |
comparison
equal
deleted
inserted
replaced
6847:65d07d9ee446 | 6848:8e47bac5643a |
---|---|
263 int scale = oper->scale(); | 263 int scale = oper->scale(); |
264 // Now we have collected every part of the ADLC MEMORY_INTER. | 264 // Now we have collected every part of the ADLC MEMORY_INTER. |
265 // See if it adds up to a base + offset. | 265 // See if it adds up to a base + offset. |
266 if (index != NULL) { | 266 if (index != NULL) { |
267 const Type* t_index = index->bottom_type(); | 267 const Type* t_index = index->bottom_type(); |
268 if (t_index->isa_narrowoop()) { // EncodeN, LoadN, LoadConN, LoadNKlass. | 268 if (t_index->isa_narrowoop() || t_index->isa_narrowklass()) { // EncodeN, LoadN, LoadConN, LoadNKlass, |
269 // EncodeNKlass, LoadConNklass. | |
269 // Memory references through narrow oops have a | 270 // Memory references through narrow oops have a |
270 // funny base so grab the type from the index: | 271 // funny base so grab the type from the index: |
271 // [R12 + narrow_oop_reg<<3 + offset] | 272 // [R12 + narrow_oop_reg<<3 + offset] |
272 assert(base == NULL, "Memory references through narrow oops have no base"); | 273 assert(base == NULL, "Memory references through narrow oops have no base"); |
273 offset = disp; | 274 offset = disp; |
350 const Type* t = base->bottom_type(); | 351 const Type* t = base->bottom_type(); |
351 if (UseCompressedOops && Universe::narrow_oop_shift() == 0) { | 352 if (UseCompressedOops && Universe::narrow_oop_shift() == 0) { |
352 // 32-bit unscaled narrow oop can be the base of any address expression | 353 // 32-bit unscaled narrow oop can be the base of any address expression |
353 t = t->make_ptr(); | 354 t = t->make_ptr(); |
354 } | 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 } | |
355 if (t->isa_intptr_t() && offset != 0 && offset != Type::OffsetBot) { | 360 if (t->isa_intptr_t() && offset != 0 && offset != Type::OffsetBot) { |
356 // We cannot assert that the offset does not look oop-ish here. | 361 // We cannot assert that the offset does not look oop-ish here. |
357 // Depending on the heap layout the cardmark base could land | 362 // Depending on the heap layout the cardmark base could land |
358 // inside some oopish region. It definitely does for Win2K. | 363 // inside some oopish region. It definitely does for Win2K. |
359 // The sum of cardmark-base plus shift-by-9-oop lands outside | 364 // The sum of cardmark-base plus shift-by-9-oop lands outside |