< prev index next >

src/hotspot/share/opto/output.cpp

Print this page




 822       // Repack the double/long as two jints.
 823       // The convention the interpreter uses is that the second local
 824       // holds the first raw word of the native double representation.
 825       // This is actually reasonable, since locals and stack arrays
 826       // grow downwards in all implementations.
 827       // (If, on some machine, the interpreter's Java locals or stack
 828       // were to grow upwards, the embedded doubles would be word-swapped.)
 829       array->append(new_loc_value( C->regalloc(), OptoReg::add(regnum,1), Location::normal ));
 830       array->append(new_loc_value( C->regalloc(),              regnum   , Location::normal ));
 831     }
 832 #endif //_LP64
 833     else if( (t->base() == Type::FloatBot || t->base() == Type::FloatCon) &&
 834              OptoReg::is_reg(regnum) ) {
 835       array->append(new_loc_value( C->regalloc(), regnum, Matcher::float_in_double()
 836                                                       ? Location::float_in_dbl : Location::normal ));
 837     } else if( t->base() == Type::Int && OptoReg::is_reg(regnum) ) {
 838       array->append(new_loc_value( C->regalloc(), regnum, Matcher::int_in_long
 839                                                       ? Location::int_in_long : Location::normal ));
 840     } else if( t->base() == Type::NarrowOop ) {
 841       array->append(new_loc_value( C->regalloc(), regnum, Location::narrowoop ));




 842     } else {
 843       array->append(new_loc_value( C->regalloc(), regnum, C->regalloc()->is_oop(local) ? Location::oop : Location::normal ));
 844     }
 845     return;
 846   }
 847 
 848   // No register.  It must be constant data.
 849   switch (t->base()) {
 850     case Type::Half:              // Second half of a double
 851       ShouldNotReachHere();       // Caller should skip 2nd halves
 852       break;
 853     case Type::AnyPtr:
 854       array->append(new ConstantOopWriteValue(NULL));
 855       break;
 856     case Type::AryPtr:
 857     case Type::InstPtr:          // fall through
 858       array->append(new ConstantOopWriteValue(t->isa_oopptr()->const_oop()->constant_encoding()));
 859       break;
 860     case Type::NarrowOop:
 861       if (t == TypeNarrowOop::NULL_PTR) {




 822       // Repack the double/long as two jints.
 823       // The convention the interpreter uses is that the second local
 824       // holds the first raw word of the native double representation.
 825       // This is actually reasonable, since locals and stack arrays
 826       // grow downwards in all implementations.
 827       // (If, on some machine, the interpreter's Java locals or stack
 828       // were to grow upwards, the embedded doubles would be word-swapped.)
 829       array->append(new_loc_value( C->regalloc(), OptoReg::add(regnum,1), Location::normal ));
 830       array->append(new_loc_value( C->regalloc(),              regnum   , Location::normal ));
 831     }
 832 #endif //_LP64
 833     else if( (t->base() == Type::FloatBot || t->base() == Type::FloatCon) &&
 834              OptoReg::is_reg(regnum) ) {
 835       array->append(new_loc_value( C->regalloc(), regnum, Matcher::float_in_double()
 836                                                       ? Location::float_in_dbl : Location::normal ));
 837     } else if( t->base() == Type::Int && OptoReg::is_reg(regnum) ) {
 838       array->append(new_loc_value( C->regalloc(), regnum, Matcher::int_in_long
 839                                                       ? Location::int_in_long : Location::normal ));
 840     } else if( t->base() == Type::NarrowOop ) {
 841       array->append(new_loc_value( C->regalloc(), regnum, Location::narrowoop ));
 842     } else if ( t->base() == Type::VectorS || t->base() == Type::VectorD ||
 843                 t->base() == Type::VectorX || t->base() == Type::VectorY ||
 844                 t->base() == Type::VectorZ) {
 845       array->append(new_loc_value( C->regalloc(), regnum, Location::vector ));
 846     } else {
 847       array->append(new_loc_value( C->regalloc(), regnum, C->regalloc()->is_oop(local) ? Location::oop : Location::normal ));
 848     }
 849     return;
 850   }
 851 
 852   // No register.  It must be constant data.
 853   switch (t->base()) {
 854     case Type::Half:              // Second half of a double
 855       ShouldNotReachHere();       // Caller should skip 2nd halves
 856       break;
 857     case Type::AnyPtr:
 858       array->append(new ConstantOopWriteValue(NULL));
 859       break;
 860     case Type::AryPtr:
 861     case Type::InstPtr:          // fall through
 862       array->append(new ConstantOopWriteValue(t->isa_oopptr()->const_oop()->constant_encoding()));
 863       break;
 864     case Type::NarrowOop:
 865       if (t == TypeNarrowOop::NULL_PTR) {


< prev index next >