Mercurial > hg > graal-jvmci-8
diff src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp @ 6739:8a02ca5e5576
7195816: NPG: Crash in c1_ValueType - ShouldNotReachHere
Summary: C1 needs knowledge of T_METADATA at the LIR level.
Reviewed-by: kvn, coleenp
author | roland |
---|---|
date | Tue, 11 Sep 2012 16:20:57 +0200 |
parents | da91efe96a93 |
children | 7eca5de9e0b6 |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp Tue Sep 11 14:59:23 2012 +0200 +++ b/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp Tue Sep 11 16:20:57 2012 +0200 @@ -884,7 +884,7 @@ LIR_Opr tmp2 = FrameMap::G3_oop_opr; LIR_Opr tmp3 = FrameMap::G4_oop_opr; LIR_Opr tmp4 = FrameMap::O1_oop_opr; - LIR_Opr klass_reg = FrameMap::G5_oop_opr; + LIR_Opr klass_reg = FrameMap::G5_metadata_opr; new_instance(reg, x->klass(), tmp1, tmp2, tmp3, tmp4, klass_reg, info); LIR_Opr result = rlock_result(x); __ move(reg, result); @@ -903,11 +903,11 @@ LIR_Opr tmp2 = FrameMap::G3_oop_opr; LIR_Opr tmp3 = FrameMap::G4_oop_opr; LIR_Opr tmp4 = FrameMap::O1_oop_opr; - LIR_Opr klass_reg = FrameMap::G5_oop_opr; + LIR_Opr klass_reg = FrameMap::G5_metadata_opr; LIR_Opr len = length.result(); BasicType elem_type = x->elt_type(); - __ oop2reg(ciTypeArrayKlass::make(elem_type)->constant_encoding(), klass_reg); + __ metadata2reg(ciTypeArrayKlass::make(elem_type)->constant_encoding(), klass_reg); CodeStub* slow_path = new NewTypeArrayStub(klass_reg, len, reg, info); __ allocate_array(reg, len, tmp1, tmp2, tmp3, tmp4, elem_type, klass_reg, slow_path); @@ -935,7 +935,7 @@ LIR_Opr tmp2 = FrameMap::G3_oop_opr; LIR_Opr tmp3 = FrameMap::G4_oop_opr; LIR_Opr tmp4 = FrameMap::O1_oop_opr; - LIR_Opr klass_reg = FrameMap::G5_oop_opr; + LIR_Opr klass_reg = FrameMap::G5_metadata_opr; LIR_Opr len = length.result(); CodeStub* slow_path = new NewObjectArrayStub(klass_reg, len, reg, info); @@ -985,8 +985,8 @@ // This instruction can be deoptimized in the slow path : use // O0 as result register. - const LIR_Opr reg = result_register_for(x->type()); - klass2reg_with_patching(reg, x->klass(), patching_info); + const LIR_Opr klass_reg = FrameMap::O0_metadata_opr; + klass2reg_with_patching(klass_reg, x->klass(), patching_info); LIR_Opr rank = FrameMap::O1_opr; __ move(LIR_OprFact::intConst(x->rank()), rank); LIR_Opr varargs = FrameMap::as_pointer_opr(O2); @@ -995,9 +995,10 @@ LIR_OprFact::intptrConst(offset_from_sp), varargs); LIR_OprList* args = new LIR_OprList(3); - args->append(reg); + args->append(klass_reg); args->append(rank); args->append(varargs); + const LIR_Opr reg = result_register_for(x->type()); __ call_runtime(Runtime1::entry_for(Runtime1::new_multi_array_id), LIR_OprFact::illegalOpr, reg, args, info);