changeset 41052 | 3362c4368286 |
parent 40881 | a4955213b573 |
child 41066 | e8c366069761 |
child 41323 | ddd5600d4762 |
41051:77740a69b211 | 41052:3362c4368286 |
---|---|
2469 // the one that guards them: pin the Load node |
2469 // the one that guards them: pin the Load node |
2470 p = make_load(control(), adr, value_type, type, adr_type, mo, LoadNode::Pinned, requires_atomic_access, unaligned, mismatched); |
2470 p = make_load(control(), adr, value_type, type, adr_type, mo, LoadNode::Pinned, requires_atomic_access, unaligned, mismatched); |
2471 // load value |
2471 // load value |
2472 switch (type) { |
2472 switch (type) { |
2473 case T_BOOLEAN: |
2473 case T_BOOLEAN: |
2474 { |
|
2475 // Normalize the value returned by getBoolean in the following cases |
|
2476 if (mismatched || |
|
2477 heap_base_oop == top() || // - heap_base_oop is NULL or |
|
2478 (can_access_non_heap && alias_type->field() == NULL) // - heap_base_oop is potentially NULL |
|
2479 // and the unsafe access is made to large offset |
|
2480 // (i.e., larger than the maximum offset necessary for any |
|
2481 // field access) |
|
2482 ) { |
|
2483 IdealKit ideal = IdealKit(this); |
|
2484 #define __ ideal. |
|
2485 IdealVariable normalized_result(ideal); |
|
2486 __ declarations_done(); |
|
2487 __ set(normalized_result, p); |
|
2488 __ if_then(p, BoolTest::ne, ideal.ConI(0)); |
|
2489 __ set(normalized_result, ideal.ConI(1)); |
|
2490 ideal.end_if(); |
|
2491 final_sync(ideal); |
|
2492 p = __ value(normalized_result); |
|
2493 #undef __ |
|
2494 } |
|
2495 } |
|
2474 case T_CHAR: |
2496 case T_CHAR: |
2475 case T_BYTE: |
2497 case T_BYTE: |
2476 case T_SHORT: |
2498 case T_SHORT: |
2477 case T_INT: |
2499 case T_INT: |
2478 case T_LONG: |
2500 case T_LONG: |