661 // For SPARC we have to swap high and low words for
662 // long values stored in a single-register (g0-g7).
663 array->append(new_loc_value( _regalloc, regnum , Location::normal ));
664 array->append(new_loc_value( _regalloc, OptoReg::add(regnum,1), Location::normal ));
665 } else
666 #endif //SPARC
667 if( t->base() == Type::DoubleBot || t->base() == Type::DoubleCon || t->base() == Type::Long ) {
668 // Repack the double/long as two jints.
669 // The convention the interpreter uses is that the second local
670 // holds the first raw word of the native double representation.
671 // This is actually reasonable, since locals and stack arrays
672 // grow downwards in all implementations.
673 // (If, on some machine, the interpreter's Java locals or stack
674 // were to grow upwards, the embedded doubles would be word-swapped.)
675 array->append(new_loc_value( _regalloc, OptoReg::add(regnum,1), Location::normal ));
676 array->append(new_loc_value( _regalloc, regnum , Location::normal ));
677 }
678 #endif //_LP64
679 else if( (t->base() == Type::FloatBot || t->base() == Type::FloatCon) &&
680 OptoReg::is_reg(regnum) ) {
681 array->append(new_loc_value( _regalloc, regnum, Matcher::float_in_double
682 ? Location::float_in_dbl : Location::normal ));
683 } else if( t->base() == Type::Int && OptoReg::is_reg(regnum) ) {
684 array->append(new_loc_value( _regalloc, regnum, Matcher::int_in_long
685 ? Location::int_in_long : Location::normal ));
686 } else if( t->base() == Type::NarrowOop ) {
687 array->append(new_loc_value( _regalloc, regnum, Location::narrowoop ));
688 } else {
689 array->append(new_loc_value( _regalloc, regnum, _regalloc->is_oop(local) ? Location::oop : Location::normal ));
690 }
691 return;
692 }
693
694 // No register. It must be constant data.
695 switch (t->base()) {
696 case Type::Half: // Second half of a double
697 ShouldNotReachHere(); // Caller should skip 2nd halves
698 break;
699 case Type::AnyPtr:
700 array->append(new ConstantOopWriteValue(NULL));
701 break;
|
661 // For SPARC we have to swap high and low words for
662 // long values stored in a single-register (g0-g7).
663 array->append(new_loc_value( _regalloc, regnum , Location::normal ));
664 array->append(new_loc_value( _regalloc, OptoReg::add(regnum,1), Location::normal ));
665 } else
666 #endif //SPARC
667 if( t->base() == Type::DoubleBot || t->base() == Type::DoubleCon || t->base() == Type::Long ) {
668 // Repack the double/long as two jints.
669 // The convention the interpreter uses is that the second local
670 // holds the first raw word of the native double representation.
671 // This is actually reasonable, since locals and stack arrays
672 // grow downwards in all implementations.
673 // (If, on some machine, the interpreter's Java locals or stack
674 // were to grow upwards, the embedded doubles would be word-swapped.)
675 array->append(new_loc_value( _regalloc, OptoReg::add(regnum,1), Location::normal ));
676 array->append(new_loc_value( _regalloc, regnum , Location::normal ));
677 }
678 #endif //_LP64
679 else if( (t->base() == Type::FloatBot || t->base() == Type::FloatCon) &&
680 OptoReg::is_reg(regnum) ) {
681 array->append(new_loc_value( _regalloc, regnum, Matcher::float_in_double()
682 ? Location::float_in_dbl : Location::normal ));
683 } else if( t->base() == Type::Int && OptoReg::is_reg(regnum) ) {
684 array->append(new_loc_value( _regalloc, regnum, Matcher::int_in_long
685 ? Location::int_in_long : Location::normal ));
686 } else if( t->base() == Type::NarrowOop ) {
687 array->append(new_loc_value( _regalloc, regnum, Location::narrowoop ));
688 } else {
689 array->append(new_loc_value( _regalloc, regnum, _regalloc->is_oop(local) ? Location::oop : Location::normal ));
690 }
691 return;
692 }
693
694 // No register. It must be constant data.
695 switch (t->base()) {
696 case Type::Half: // Second half of a double
697 ShouldNotReachHere(); // Caller should skip 2nd halves
698 break;
699 case Type::AnyPtr:
700 array->append(new ConstantOopWriteValue(NULL));
701 break;
|