Mercurial > hg > truffle
comparison src/share/vm/c1/c1_LinearScan.cpp @ 1339:09ac706c2623
Merge
author | asaha |
---|---|
date | Wed, 24 Mar 2010 17:16:33 -0700 |
parents | 323bd24c6520 |
children | c466efa608d5 |
comparison
equal
deleted
inserted
replaced
1338:f5dd08ad65df | 1339:09ac706c2623 |
---|---|
2462 return 1; | 2462 return 1; |
2463 } | 2463 } |
2464 | 2464 |
2465 case T_LONG: // fall through | 2465 case T_LONG: // fall through |
2466 case T_DOUBLE: { | 2466 case T_DOUBLE: { |
2467 #ifdef _LP64 | |
2468 scope_values->append(&_int_0_scope_value); | |
2469 scope_values->append(new ConstantLongValue(c->as_jlong_bits())); | |
2470 #else | |
2467 if (hi_word_offset_in_bytes > lo_word_offset_in_bytes) { | 2471 if (hi_word_offset_in_bytes > lo_word_offset_in_bytes) { |
2468 scope_values->append(new ConstantIntValue(c->as_jint_hi_bits())); | 2472 scope_values->append(new ConstantIntValue(c->as_jint_hi_bits())); |
2469 scope_values->append(new ConstantIntValue(c->as_jint_lo_bits())); | 2473 scope_values->append(new ConstantIntValue(c->as_jint_lo_bits())); |
2470 } else { | 2474 } else { |
2471 scope_values->append(new ConstantIntValue(c->as_jint_lo_bits())); | 2475 scope_values->append(new ConstantIntValue(c->as_jint_lo_bits())); |
2472 scope_values->append(new ConstantIntValue(c->as_jint_hi_bits())); | 2476 scope_values->append(new ConstantIntValue(c->as_jint_hi_bits())); |
2473 } | 2477 } |
2474 | 2478 #endif |
2475 return 2; | 2479 return 2; |
2476 } | 2480 } |
2477 | 2481 |
2478 default: | 2482 default: |
2479 ShouldNotReachHere(); | 2483 ShouldNotReachHere(); |
2501 return 1; | 2505 return 1; |
2502 | 2506 |
2503 } else if (opr->is_single_cpu()) { | 2507 } else if (opr->is_single_cpu()) { |
2504 bool is_oop = opr->is_oop_register(); | 2508 bool is_oop = opr->is_oop_register(); |
2505 int cache_idx = opr->cpu_regnr() * 2 + (is_oop ? 1 : 0); | 2509 int cache_idx = opr->cpu_regnr() * 2 + (is_oop ? 1 : 0); |
2510 Location::Type int_loc_type = NOT_LP64(Location::normal) LP64_ONLY(Location::int_in_long); | |
2506 | 2511 |
2507 ScopeValue* sv = _scope_value_cache.at(cache_idx); | 2512 ScopeValue* sv = _scope_value_cache.at(cache_idx); |
2508 if (sv == NULL) { | 2513 if (sv == NULL) { |
2509 Location::Type loc_type = is_oop ? Location::oop : Location::normal; | 2514 Location::Type loc_type = is_oop ? Location::oop : int_loc_type; |
2510 VMReg rname = frame_map()->regname(opr); | 2515 VMReg rname = frame_map()->regname(opr); |
2511 sv = new LocationValue(Location::new_reg_loc(loc_type, rname)); | 2516 sv = new LocationValue(Location::new_reg_loc(loc_type, rname)); |
2512 _scope_value_cache.at_put(cache_idx, sv); | 2517 _scope_value_cache.at_put(cache_idx, sv); |
2513 } | 2518 } |
2514 | 2519 |
2515 // check if cached value is correct | 2520 // check if cached value is correct |
2516 DEBUG_ONLY(assert_equal(sv, new LocationValue(Location::new_reg_loc(is_oop ? Location::oop : Location::normal, frame_map()->regname(opr))))); | 2521 DEBUG_ONLY(assert_equal(sv, new LocationValue(Location::new_reg_loc(is_oop ? Location::oop : int_loc_type, frame_map()->regname(opr))))); |
2517 | 2522 |
2518 scope_values->append(sv); | 2523 scope_values->append(sv); |
2519 return 1; | 2524 return 1; |
2520 | 2525 |
2521 #ifdef X86 | 2526 #ifdef X86 |