Mercurial > hg > graal-compiler
comparison src/share/vm/opto/machnode.cpp @ 235:9c2ecc2ffb12 jdk7-b31
Merge
author | trims |
---|---|
date | Fri, 11 Jul 2008 01:14:44 -0700 |
parents | d1605aabd0a1 1e026f8da827 |
children | 98cb887364d3 |
comparison
equal
deleted
inserted
replaced
197:de141433919f | 235:9c2ecc2ffb12 |
---|---|
260 intptr_t disp = oper->constant_disp(); | 260 intptr_t disp = oper->constant_disp(); |
261 int scale = oper->scale(); | 261 int scale = oper->scale(); |
262 // Now we have collected every part of the ADLC MEMORY_INTER. | 262 // Now we have collected every part of the ADLC MEMORY_INTER. |
263 // See if it adds up to a base + offset. | 263 // See if it adds up to a base + offset. |
264 if (index != NULL) { | 264 if (index != NULL) { |
265 if (!index->is_Con()) { | 265 const Type* t_index = index->bottom_type(); |
266 const TypeNarrowOop* narrowoop = index->bottom_type()->isa_narrowoop(); | 266 if (t_index->isa_narrowoop()) { // EncodeN, LoadN, LoadConN, LoadNKlass. |
267 if (narrowoop != NULL) { | 267 // Memory references through narrow oops have a |
268 // Memory references through narrow oops have a | 268 // funny base so grab the type from the index: |
269 // funny base so grab the type from the index. | 269 // [R12 + narrow_oop_reg<<3 + offset] |
270 adr_type = narrowoop->make_oopptr(); | 270 assert(base == NULL, "Memory references through narrow oops have no base"); |
271 return NULL; | 271 offset = disp; |
272 } | 272 adr_type = t_index->make_ptr()->add_offset(offset); |
273 return NULL; | |
274 } else if (!index->is_Con()) { | |
273 disp = Type::OffsetBot; | 275 disp = Type::OffsetBot; |
274 } else if (disp != Type::OffsetBot) { | 276 } else if (disp != Type::OffsetBot) { |
275 const TypeX* ti = index->bottom_type()->isa_intptr_t(); | 277 const TypeX* ti = t_index->isa_intptr_t(); |
276 if (ti == NULL) { | 278 if (ti == NULL) { |
277 disp = Type::OffsetBot; // a random constant?? | 279 disp = Type::OffsetBot; // a random constant?? |
278 } else { | 280 } else { |
279 disp += ti->get_con() << scale; | 281 disp += ti->get_con() << scale; |
280 } | 282 } |