src/share/vm/c1/c1_LinearScan.cpp

changeset 1804
0a43776437b6
parent 1732
c466efa608d5
child 1832
b4776199210f
     1.1 --- a/src/share/vm/c1/c1_LinearScan.cpp	Thu Apr 08 10:55:40 2010 +0200
     1.2 +++ b/src/share/vm/c1/c1_LinearScan.cpp	Thu Apr 08 12:13:07 2010 -0700
     1.3 @@ -2608,6 +2608,46 @@
     1.4      } else if (opr->is_double_xmm()) {
     1.5        assert(opr->fpu_regnrLo() == opr->fpu_regnrHi(), "assumed in calculation");
     1.6        VMReg rname_first  = opr->as_xmm_double_reg()->as_VMReg();
     1.7 +#  ifdef _LP64
     1.8 +      first = new LocationValue(Location::new_reg_loc(Location::dbl, rname_first));
     1.9 +      second = &_int_0_scope_value;
    1.10 +#  else
    1.11 +      first = new LocationValue(Location::new_reg_loc(Location::normal, rname_first));
    1.12 +      // %%% This is probably a waste but we'll keep things as they were for now
    1.13 +      if (true) {
    1.14 +        VMReg rname_second = rname_first->next();
    1.15 +        second = new LocationValue(Location::new_reg_loc(Location::normal, rname_second));
    1.16 +      }
    1.17 +#  endif
    1.18 +#endif
    1.19 +
    1.20 +    } else if (opr->is_double_fpu()) {
    1.21 +      // On SPARC, fpu_regnrLo/fpu_regnrHi represents the two halves of
    1.22 +      // the double as float registers in the native ordering. On X86,
    1.23 +      // fpu_regnrLo is a FPU stack slot whose VMReg represents
    1.24 +      // the low-order word of the double and fpu_regnrLo + 1 is the
    1.25 +      // name for the other half.  *first and *second must represent the
    1.26 +      // least and most significant words, respectively.
    1.27 +
    1.28 +#ifdef X86
    1.29 +      // the exact location of fpu stack values is only known
    1.30 +      // during fpu stack allocation, so the stack allocator object
    1.31 +      // must be present
    1.32 +      assert(use_fpu_stack_allocation(), "should not have float stack values without fpu stack allocation (all floats must be SSE2)");
    1.33 +      assert(_fpu_stack_allocator != NULL, "must be present");
    1.34 +      opr = _fpu_stack_allocator->to_fpu_stack(opr);
    1.35 +
    1.36 +      assert(opr->fpu_regnrLo() == opr->fpu_regnrHi(), "assumed in calculation (only fpu_regnrHi is used)");
    1.37 +#endif
    1.38 +#ifdef SPARC
    1.39 +      assert(opr->fpu_regnrLo() == opr->fpu_regnrHi() + 1, "assumed in calculation (only fpu_regnrHi is used)");
    1.40 +#endif
    1.41 +
    1.42 +      VMReg rname_first = frame_map()->fpu_regname(opr->fpu_regnrHi());
    1.43 +#ifdef _LP64
    1.44 +      first = new LocationValue(Location::new_reg_loc(Location::dbl, rname_first));
    1.45 +      second = &_int_0_scope_value;
    1.46 +#else
    1.47        first = new LocationValue(Location::new_reg_loc(Location::normal, rname_first));
    1.48        // %%% This is probably a waste but we'll keep things as they were for now
    1.49        if (true) {
    1.50 @@ -2616,37 +2656,6 @@
    1.51        }
    1.52  #endif
    1.53  
    1.54 -    } else if (opr->is_double_fpu()) {
    1.55 -      // On SPARC, fpu_regnrLo/fpu_regnrHi represents the two halves of
    1.56 -      // the double as float registers in the native ordering. On X86,
    1.57 -      // fpu_regnrLo is a FPU stack slot whose VMReg represents
    1.58 -      // the low-order word of the double and fpu_regnrLo + 1 is the
    1.59 -      // name for the other half.  *first and *second must represent the
    1.60 -      // least and most significant words, respectively.
    1.61 -
    1.62 -#ifdef X86
    1.63 -      // the exact location of fpu stack values is only known
    1.64 -      // during fpu stack allocation, so the stack allocator object
    1.65 -      // must be present
    1.66 -      assert(use_fpu_stack_allocation(), "should not have float stack values without fpu stack allocation (all floats must be SSE2)");
    1.67 -      assert(_fpu_stack_allocator != NULL, "must be present");
    1.68 -      opr = _fpu_stack_allocator->to_fpu_stack(opr);
    1.69 -
    1.70 -      assert(opr->fpu_regnrLo() == opr->fpu_regnrHi(), "assumed in calculation (only fpu_regnrHi is used)");
    1.71 -#endif
    1.72 -#ifdef SPARC
    1.73 -      assert(opr->fpu_regnrLo() == opr->fpu_regnrHi() + 1, "assumed in calculation (only fpu_regnrHi is used)");
    1.74 -#endif
    1.75 -
    1.76 -      VMReg rname_first = frame_map()->fpu_regname(opr->fpu_regnrHi());
    1.77 -
    1.78 -      first = new LocationValue(Location::new_reg_loc(Location::normal, rname_first));
    1.79 -      // %%% This is probably a waste but we'll keep things as they were for now
    1.80 -      if (true) {
    1.81 -        VMReg rname_second = rname_first->next();
    1.82 -        second = new LocationValue(Location::new_reg_loc(Location::normal, rname_second));
    1.83 -      }
    1.84 -
    1.85      } else {
    1.86        ShouldNotReachHere();
    1.87        first = NULL;

mercurial