8005722: Assert in c1_LIR.hpp incorrect wrt to number of register operands
Summary: In LIR_OpVisitState::visit() the receiver operand is processed twice
Reviewed-by: roland, vladidan
--- a/hotspot/src/share/vm/c1/c1_LIR.cpp Tue Feb 12 09:54:34 2013 -0800
+++ b/hotspot/src/share/vm/c1/c1_LIR.cpp Thu Jan 24 13:27:54 2013 -0500
@@ -814,7 +814,7 @@
// only visit register parameters
int n = opJavaCall->_arguments->length();
- for (int i = 0; i < n; i++) {
+ for (int i = opJavaCall->_receiver->is_valid() ? 1 : 0; i < n; i++) {
if (!opJavaCall->_arguments->at(i)->is_pointer()) {
do_input(*opJavaCall->_arguments->adr_at(i));
}