src/share/vm/c1/c1_LinearScan.cpp

changeset 3195
eba73e0c7780
parent 3108
7588156f5cf9
child 3575
c7401dcad8bf
     1.1 --- a/src/share/vm/c1/c1_LinearScan.cpp	Tue Oct 04 14:30:04 2011 -0700
     1.2 +++ b/src/share/vm/c1/c1_LinearScan.cpp	Fri Oct 07 13:28:44 2011 +0200
     1.3 @@ -2619,6 +2619,24 @@
     1.4  
     1.5      Location::Type loc_type = float_saved_as_double ? Location::float_in_dbl : Location::normal;
     1.6      VMReg rname = frame_map()->fpu_regname(opr->fpu_regnr());
     1.7 +#ifndef __SOFTFP__
     1.8 +#ifndef VM_LITTLE_ENDIAN
     1.9 +    if (! float_saved_as_double) {
    1.10 +      // On big endian system, we may have an issue if float registers use only
    1.11 +      // the low half of the (same) double registers.
    1.12 +      // Both the float and the double could have the same regnr but would correspond
    1.13 +      // to two different addresses once saved.
    1.14 +
    1.15 +      // get next safely (no assertion checks)
    1.16 +      VMReg next = VMRegImpl::as_VMReg(1+rname->value());
    1.17 +      if (next->is_reg() &&
    1.18 +          (next->as_FloatRegister() == rname->as_FloatRegister())) {
    1.19 +        // the back-end does use the same numbering for the double and the float
    1.20 +        rname = next; // VMReg for the low bits, e.g. the real VMReg for the float
    1.21 +      }
    1.22 +    }
    1.23 +#endif
    1.24 +#endif
    1.25      LocationValue* sv = new LocationValue(Location::new_reg_loc(loc_type, rname));
    1.26  
    1.27      scope_values->append(sv);

mercurial